{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://emendatio.reverdin.eu/api/v1/schema/bible-chapter.json",
  "title": "bible-chapter",
  "type": "object",
  "required": [
    "work",
    "language",
    "book",
    "book_name",
    "chapter",
    "verses",
    "corrections",
    "variants",
    "licence"
  ],
  "additionalProperties": false,
  "properties": {
    "work": {
      "type": "string"
    },
    "language": {
      "type": "string"
    },
    "book": {
      "type": "string"
    },
    "book_name": {
      "type": "string"
    },
    "licence": {
      "type": "string"
    },
    "chapter": {
      "type": "integer",
      "minimum": 1
    },
    "verses": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "n",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "n": {
            "type": [
              "integer",
              "string"
            ]
          },
          "text": {
            "type": "string"
          }
        }
      }
    },
    "corrections": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "verse",
          "from",
          "to",
          "type"
        ],
        "properties": {
          "verse": {
            "type": [
              "integer",
              "string"
            ]
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "page": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "leaf": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          }
        }
      }
    },
    "variants": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "verse",
          "from",
          "to",
          "type"
        ],
        "properties": {
          "verse": {
            "type": [
              "integer",
              "string"
            ]
          },
          "from": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "page": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "leaf": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          }
        }
      }
    }
  }
}
