{
  "$id": "assessment-path-metadata.schema.json",
  "title": "Assessment Path Metadata",
  "type": "object",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "metadata.schema.json",
  "required": [ "key", "value" ],
  "additionalProperties": false,
  "allOf": [
    {
      "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:AssessmentSubtype" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Practice Test",
                "Practice Exam",
                "Quiz",
                "Test",
                "Exam",
                "Pre-Quiz",
                "Post-Quiz"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Scope" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "activity",
                "quiz",
                "test",
                "exam",
                "practiceassessment",
                "Benchmark",
                "Formative",
                "Standalone",
                "Global",
                "Custom",
                "Pre-Quiz",
                "Post-Quiz",
                "Guided Learning",
                "Practice"
              ]
            }
          }
        }
      }
    },
    {
      "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:Title" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "src:Identifier" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Language" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Chinese",
                "English",
                "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:AssessmentType" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Dynamically Delivered",
                "Fixed Form",
                "Benchmark",
                "Adaptive"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "src:Order" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "src:LessonCode" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:CourseAlignment" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Form" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [ "A", "B", "C" ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Keywords" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  ],
  "properties": {
    "key": {
      "type": "string",
      "enum": [
        "tax:Subject",
        "meta:AssessmentSubtype",
        "meta:Scope",
        "meta:GradeLevel",
        "meta:Title",
        "src:Identifier",
        "meta:Language",
        "meta:Product",
        "meta:AssessmentType",
        "src:Order",
        "src:LessonCode",
        "meta:CourseAlignment",
        "meta:Form",
        "meta:Keywords"
      ]
    },
    "value": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string" }
    }
  }
}