{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pokefocus-com/json-schema/pokefocus-com-set-schema.json",
  "title": "Set",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pokefocus-com-openapi.json#/components/schemas/Set",
  "type": "object",
  "required": [
    "id",
    "name",
    "url",
    "cards",
    "sealedProducts"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "year": {
      "type": [
        "integer",
        "null"
      ]
    },
    "releaseDate": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "imageUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "cardCount": {
      "type": "number",
      "description": "Cards PokeFocus tracks in the set."
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "sealedUrl": {
      "type": "string",
      "format": "uri"
    },
    "cardSort": {
      "type": "string",
      "enum": [
        "price_desc",
        "number"
      ]
    },
    "cards": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "number": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "TCGplayer market price (Near Mint), US dollars."
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "sealedProductCount": {
      "type": [
        "number",
        "null"
      ],
      "description": "Sealed products in the set; null when the list could not be read."
    },
    "sealedProducts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "name",
          "url"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": [
              "string",
              "null"
            ]
          },
          "marketPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "TCGplayer market price, US dollars."
          },
          "lowestListingPrice": {
            "type": [
              "number",
              "null"
            ],
            "description": "Lowest TCGplayer listing, US dollars."
          },
          "listings": {
            "type": [
              "number",
              "null"
            ]
          },
          "packCount": {
            "type": [
              "number",
              "null"
            ]
          },
          "pricePerPack": {
            "type": [
              "number",
              "null"
            ],
            "description": "Market price per pack, US dollars."
          },
          "imageUrl": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri"
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      }
    },
    "capturedAt": {
      "type": "string",
      "format": "date-time",
      "description": "When PokeFocus answered; market.asOf is when a price was refreshed."
    }
  }
}