{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Teerkost folders",
  "description": "Folder records and their OCR-processed pages published from the Teerkost scraper output.",
  "type": "array",
  "items": {
    "type": "object",
    "required": ["numPages", "shop", "hash", "pages"],
    "properties": {
      "numPages": { "type": "integer", "minimum": 0 },
      "shop": { "type": "string" },
      "hash": { "type": "string" },
      "pages": {
        "type": "array",
        "items": {
          "type": "object",
          "required": ["id", "pageNumber", "shop", "image", "text", "categories"],
          "properties": {
            "id": { "type": "string" },
            "pageNumber": { "type": "integer", "minimum": 1 },
            "shop": { "type": "string" },
            "image": { "type": "string" },
            "text": { "type": "string" },
            "categories": {
              "type": "array",
              "items": { "type": "string" }
            }
          },
          "additionalProperties": false
        }
      }
    },
    "additionalProperties": false
  }
}
