{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/uploads-sh/json-schema/uploads-sh-public-feed-item-page-schema.json",
  "title": "PublicFeedItemPage",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/uploads-sh-openapi.json#/components/schemas/PublicFeedItemPage",
  "type": "object",
  "required": [
    "feed",
    "item",
    "prev",
    "next",
    "index",
    "total"
  ],
  "properties": {
    "feed": {
      "type": "object",
      "required": [
        "id",
        "title",
        "repo",
        "number",
        "kind"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "repo": {
          "type": "string"
        },
        "number": {
          "type": [
            "integer",
            "null"
          ]
        },
        "kind": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "pull",
            "issue",
            null
          ]
        }
      }
    },
    "item": {
      "$ref": "#/$defs/PublicFeedItem"
    },
    "prev": {
      "type": [
        "string",
        "null"
      ],
      "description": "Newer neighbour item id."
    },
    "next": {
      "type": [
        "string",
        "null"
      ],
      "description": "Older neighbour item id."
    },
    "index": {
      "type": "integer",
      "minimum": 0
    },
    "total": {
      "type": "integer",
      "minimum": 0,
      "description": "Items in the feed's scope, capped at 2,000."
    },
    "github": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "title",
        "state"
      ],
      "description": "Live PR or issue title and state, public repos only. Null for a repo-wide feed.",
      "properties": {
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "open",
            "closed",
            "merged",
            null
          ]
        }
      }
    }
  },
  "$defs": {
    "Metadata": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      }
    },
    "PublicFeedItem": {
      "type": "object",
      "required": [
        "id",
        "filename",
        "status",
        "url",
        "embedUrl",
        "contentType",
        "size",
        "path",
        "state"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "filename": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "missing",
            "withheld"
          ]
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "embedUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "contentType": {
          "type": [
            "string",
            "null"
          ]
        },
        "size": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "uploaded": {
          "type": "string",
          "format": "date-time"
        },
        "modified": {
          "type": "string",
          "format": "date-time"
        },
        "path": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        },
        "metadata": {
          "$ref": "#/$defs/Metadata"
        },
        "posterUrl": {
          "type": "string",
          "format": "uri"
        },
        "videoDimensions": {
          "$ref": "#/$defs/VideoDimensions"
        }
      }
    },
    "VideoDimensions": {
      "type": "object",
      "required": [
        "width",
        "height"
      ],
      "properties": {
        "width": {
          "type": "integer",
          "minimum": 1
        },
        "height": {
          "type": "integer",
          "minimum": 1
        }
      }
    }
  }
}