{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://buryat.global/data/schema.json",
  "title": "Buryat Global public textual corpus 1.0.0",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "site",
    "usage",
    "pages",
    "resources",
    "people"
  ],
  "properties": {
    "schema_version": {
      "const": "1.0.0"
    },
    "site": {
      "const": "https://buryat.global"
    },
    "usage": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "search",
        "ai_input",
        "ai_train",
        "scope",
        "provenance",
        "limitations",
        "terms_url",
        "corrections_url"
      ],
      "properties": {
        "search": {
          "const": true
        },
        "ai_input": {
          "const": true
        },
        "ai_train": {
          "const": true
        },
        "scope": {
          "type": "string"
        },
        "provenance": {
          "type": "string"
        },
        "limitations": {
          "type": "string"
        },
        "terms_url": {
          "type": "string"
        },
        "corrections_url": {
          "type": "string"
        }
      }
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "url",
          "locale",
          "title",
          "description",
          "indexable",
          "review_status",
          "checked",
          "translations",
          "text",
          "content_html",
          "links",
          "media",
          "claims"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "locale": {
            "enum": [
              "ru",
              "en"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "indexable": {
            "type": "boolean"
          },
          "review_status": {
            "enum": [
              "pending",
              "verified",
              null
            ]
          },
          "checked": {
            "type": [
              "string",
              "null"
            ]
          },
          "translations": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "locale",
                "url"
              ],
              "properties": {
                "locale": {
                  "enum": [
                    "ru",
                    "en"
                  ]
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "text": {
            "type": "string"
          },
          "content_html": {
            "type": "string"
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url",
                "label",
                "relation"
              ],
              "properties": {
                "url": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "relation": {
                  "const": "links-to"
                }
              }
            }
          },
          "media": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "type",
                "url",
                "description"
              ],
              "properties": {
                "type": {
                  "enum": [
                    "img",
                    "audio",
                    "video",
                    "source"
                  ]
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "type",
                "evidence_status",
                "title",
                "period",
                "source_text",
                "editorial_summary",
                "source_ids",
                "checked",
                "source_locators"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "type": {
                  "enum": [
                    "directly-attested",
                    "scholarly-interpretation",
                    "later-tradition",
                    "community-knowledge",
                    "editorial-synthesis"
                  ]
                },
                "evidence_status": {
                  "enum": [
                    "strongly-supported",
                    "limited-evidence",
                    "contested",
                    "approximate",
                    "unreviewed"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "period": {
                  "type": "string"
                },
                "source_text": {
                  "type": "string"
                },
                "editorial_summary": {
                  "type": "string"
                },
                "source_ids": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "checked": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "source_locators": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "category",
          "name",
          "name_en",
          "url",
          "languages",
          "type",
          "access",
          "status",
          "checked",
          "periods",
          "regions",
          "summary_ru",
          "summary_en"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "name_en": {
            "type": "string"
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "type": {
            "type": "string"
          },
          "access": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "checked": {
            "type": "string"
          },
          "periods": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "regions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary_ru": {
            "type": "string"
          },
          "summary_en": {
            "type": "string"
          }
        }
      }
    },
    "people": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "name",
          "name_ru",
          "name_en",
          "field",
          "discipline",
          "discipline_en",
          "affiliation",
          "affiliation_en",
          "relation",
          "languages_of_work",
          "key_works",
          "key_works_en",
          "links",
          "summary_ru",
          "summary_en",
          "checked"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "name_ru": {
            "type": "string"
          },
          "name_en": {
            "type": "string"
          },
          "field": {
            "type": "string"
          },
          "discipline": {
            "type": [
              "string",
              "null"
            ]
          },
          "discipline_en": {
            "type": [
              "string",
              "null"
            ]
          },
          "affiliation": {
            "type": [
              "string",
              "null"
            ]
          },
          "affiliation_en": {
            "type": [
              "string",
              "null"
            ]
          },
          "relation": {
            "type": "string"
          },
          "languages_of_work": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "key_works": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "key_works_en": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "links": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "summary_ru": {
            "type": "string"
          },
          "summary_en": {
            "type": "string"
          },
          "checked": {
            "type": "string"
          }
        }
      }
    }
  }
}
