{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Metkagram public datasets",
  "type": "object",
  "description": "Catalog and record shapes for annotated documents, canonical annotations, complete advanced patterns, and study sets.",
  "properties": {
    "catalog": {
      "type": "object",
      "required": [
        "schemaVersion",
        "collections",
        "advancedPatterns"
      ]
    },
    "canonicalAnnotation": {
      "type": "object",
      "required": [
        "schema_version",
        "id",
        "kind",
        "text",
        "language",
        "spans",
        "source",
        "validation"
      ],
      "properties": {
        "schema_version": {
          "const": "1.0.0"
        },
        "text": {
          "type": "string"
        },
        "spans": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "start",
              "end",
              "type",
              "label"
            ]
          }
        }
      }
    },
    "annotatedDocument": {
      "type": "object",
      "required": [
        "id",
        "language",
        "title",
        "annotations"
      ]
    },
    "advancedPattern": {
      "type": "object",
      "required": [
        "id",
        "group_id",
        "set_id",
        "title_ru",
        "langs"
      ]
    },
    "studySets": {
      "type": "object",
      "required": [
        "sets",
        "learningPaths"
      ]
    }
  }
}
