{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://emendatio.reverdin.eu/api/v1/schema/summa-index.json",
  "title": "Summa Theologiae Index",
  "type": "object",
  "required": [
    "work",
    "title",
    "author",
    "lang",
    "total_questions",
    "parts",
    "corrections_count"
  ],
  "additionalProperties": false,
  "properties": {
    "work": {
      "type": "string",
      "const": "summa"
    },
    "title": {
      "type": "string"
    },
    "author": {
      "type": "string"
    },
    "lang": {
      "type": "string",
      "const": "la"
    },
    "total_questions": {
      "type": "integer",
      "const": 614
    },
    "parts": {
      "type": "array",
      "minItems": 5,
      "maxItems": 5,
      "items": {
        "type": "object",
        "required": [
          "part",
          "slug",
          "name_la",
          "questions_count",
          "questions"
        ],
        "additionalProperties": false,
        "properties": {
          "part": {
            "type": "integer",
            "minimum": 1,
            "maximum": 5
          },
          "slug": {
            "type": "string"
          },
          "name_la": {
            "type": "string"
          },
          "questions_count": {
            "type": "integer",
            "minimum": 1
          },
          "questions": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "required": [
                "question",
                "title_fr",
                "title_en",
                "source",
                "license",
                "url"
              ],
              "additionalProperties": false,
              "properties": {
                "question": {
                  "type": "integer",
                  "minimum": 1
                },
                "title_fr": {
                  "type": "string"
                },
                "title_en": {
                  "type": "string"
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "wikisource",
                    "leonina"
                  ]
                },
                "license": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "corrections_count": {
      "type": "integer",
      "minimum": 0
    }
  }
}
