{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://emendatio.reverdin.eu/api/v1/schema/martini-index.json",
  "title": "Martini Bible Index",
  "type": "object",
  "required": [
    "work",
    "title",
    "lang",
    "edition",
    "license",
    "total_corrections",
    "total_variants",
    "books"
  ],
  "additionalProperties": false,
  "properties": {
    "work": {
      "type": "string",
      "const": "martini"
    },
    "title": {
      "type": "string"
    },
    "lang": {
      "type": "string",
      "const": "it"
    },
    "edition": {
      "type": "string"
    },
    "license": {
      "type": "string"
    },
    "total_corrections": {
      "type": "integer",
      "minimum": 1
    },
    "total_variants": {
      "type": "integer",
      "minimum": 0
    },
    "books": {
      "type": "array",
      "minItems": 27,
      "items": {
        "type": "object",
        "required": [
          "book",
          "slug",
          "name",
          "status",
          "chapters",
          "chapters_count",
          "corrections_count",
          "variants_count",
          "retranscribed_chapters",
          "erara_pdf"
        ],
        "additionalProperties": false,
        "properties": {
          "book": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "chapters": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "chapters_count": {
            "type": "integer",
            "minimum": 1
          },
          "corrections_count": {
            "type": "integer",
            "minimum": 0
          },
          "variants_count": {
            "type": "integer",
            "minimum": 0
          },
          "retranscribed_chapters": {
            "type": "array",
            "items": {
              "type": "integer"
            }
          },
          "erara_pdf": {
            "type": "integer"
          }
        }
      }
    }
  }
}
