{
  "$id": "vocabulary-metadata.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "metadata.schema.json",
  "additionalProperties": false,
  "title": "Vocabulary Metadata",
  "type": "object",
  "allOf": [
    {
      "if": { "properties": { "key": { "const": "src:Platform" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [ "AIA", "Creatium", "LearningMate" ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "tax:Subject" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Math",
                "Language Arts",
                "Science",
                "Social and Emotional Learning",
                "Social Studies",
                "World Languages",
                "General Electives",
                "CTE Electives",
                "Spanish Language Arts",
                "English Language Development"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:GradeLevel" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "enum": [ "PK", "K", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "HS" ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Language" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [ "English", "Chinese", "French", "German", "Latin", "Spanish" ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Product" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "MPNG",
                "EdgeEX",
                "Project Link",
                "ImaginePlus Math",
                "Imagine Language and Literacy"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Copyright" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "© Edgenuity Inc.",
                "© Imagine Learning LLC",
                "© Illustrative Mathematics"
              ]
            }
          }
        }
      }
    }
  ],
  "properties": {
    "key": {
      "type": "string",
      "enum": [
        "src:Identifier",
        "src:Platform",
        "src:LessonCode",
        "src:LessonID",
        "src:Title",
        "tax:Subject",
        "meta:Title",
        "meta:Description",
        "meta:GradeLevel",
        "meta:Language",
        "meta:Product",
        "meta:Copyright"
      ]
    },
    "value": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string" }
    }
  },
  "required": [ "key", "value" ]
}
