{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glowjakt-se/json-schema/glowjakt-se-theme-page-schema.json",
  "title": "ThemePage",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/glowjakt-se-openapi.json#/components/schemas/ThemePage",
  "type": "object",
  "properties": {
    "key": {
      "type": "string"
    },
    "slug": {
      "type": "string"
    },
    "kind": {
      "type": "string",
      "enum": [
        "blend",
        "price_drop",
        "hub"
      ]
    },
    "title": {
      "type": [
        "string",
        "null"
      ]
    },
    "h1": {
      "type": [
        "string",
        "null"
      ]
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "in_season": {
      "type": "boolean",
      "description": "True while one of the page's events is in season; title, h1 and description then carry the seasonal variant."
    },
    "page": {
      "type": "integer"
    },
    "size": {
      "type": "integer"
    },
    "total": {
      "type": "integer"
    },
    "products": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ThemeProduct"
      }
    }
  },
  "$defs": {
    "ThemeProduct": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "name": {
          "type": "string"
        },
        "brand": {
          "type": [
            "string",
            "null"
          ]
        },
        "slug": {
          "type": [
            "string",
            "null"
          ],
          "description": "Product slug for GET /api/products/{slug}."
        },
        "price": {
          "type": "number",
          "description": "Lowest in-stock price in the market currency."
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "store_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "affiliate_url": {
          "type": [
            "string",
            "null"
          ],
          "description": "Link to the store (via a /go/ redirect)."
        },
        "offer_count": {
          "type": [
            "integer",
            "null"
          ]
        },
        "content_value": {
          "type": [
            "number",
            "null"
          ],
          "description": "Germany only: package content for the unit price (Grundpreis); null elsewhere."
        },
        "content_unit": {
          "type": [
            "string",
            "null"
          ],
          "description": "Germany only: unit of content_value (e.g. ml, g)."
        },
        "group_index": {
          "type": "integer"
        },
        "round": {
          "type": "integer"
        },
        "reference_price": {
          "type": [
            "number",
            "null"
          ],
          "description": "price_drop pages: lowest price of the last four completed weeks."
        },
        "drop_percent": {
          "type": [
            "number",
            "null"
          ],
          "description": "price_drop pages: drop from reference_price, in percent, rounded down to one decimal."
        }
      }
    }
  }
}