{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Period dossier",
  "type": "object",
  "required": [
    "id",
    "title",
    "display_window",
    "central_question",
    "established_in_this_pass",
    "limitations",
    "research_tasks",
    "sources",
    "annual_span",
    "kind"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[EP][0-9]{2,}$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "display_window": {
      "type": "string",
      "minLength": 1
    },
    "central_question": {
      "type": "string",
      "minLength": 1
    },
    "established_in_this_pass": {
      "type": "string",
      "minLength": 1
    },
    "limitations": {
      "type": "string",
      "minLength": 1
    },
    "research_tasks": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^S[0-9]{3,}$"
      }
    },
    "annual_span": {
      "anyOf": [
        {
          "type": "null"
        },
        {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "items": {
            "type": "integer",
            "not": {
              "const": 0
            },
            "title": "nonzero BCE/CE year (negative = BCE, positive = CE, no year zero)"
          }
        }
      ]
    },
    "kind": {
      "enum": [
        "prehistory_and_deep_time",
        "documentary_period"
      ]
    }
  }
}
