{
  "$id": "closereader-metadata.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "metadata.schema.json",
  "additionalProperties": false,
  "allOf": [
    {
      "if": { "properties": { "key": { "const": "meta:DOK" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "1",
                "2",
                "3",
                "4"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:ILTextType" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "Literature",
                "Informational Text"
              ]
            }
          }
        }
      }
    },
    {
      "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"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Style" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "PK-2",
                "K-2",
                "3-5",
                "6-12",
                "3-12"
              ]
            }
          }
        }
      }
    },
    {
      "if": { "properties": { "key": { "const": "meta:Blooms" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "1-Remembering",
                "2-Understanding",
                "3-Applying",
                "4-Analyzing",
                "5-Evaluating",
                "6-Creating"
              ]
            }
          }
        }
      }
    },
    {
      "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": "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:ContainsMedia" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [ "Image", "Audio" ]
            }
          }
        }
      }
    },
    {
      "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: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: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:ILWrittenResponseRubric" } } },
      "then": {
        "properties": {
          "value": {
            "type": "array",
            "minItems": 1,
            "maxItems": 1,
            "items": {
              "type": "string",
              "enum": [
                "EngagementCheck",
                "ShortAnswer",
                "LongAnswer"
              ]
            }
          }
        }
      }
    }
  ],
  "properties": {
    "key": {
      "type": "string",
      "enum": [
        "src:Platform",
        "src:AssessmentID",
        "meta:ContainsMedia",
        "src:LessonID",
        "meta:Scope",
        "src:Identifier",
        "meta:Lesson",
        "src:AssessmentTitle",
        "meta:Product",
        "src:ActivityID",
        "src:Order",
        "src:LibraryTitle",
        "src:LessonCode",
        "meta:Blooms",
        "meta:Author",
        "meta:Style",
        "meta:Copyright",
        "src:ObjectiveID",
        "tax:Subject",
        "src:QuestionType",
        "src:Library",
        "meta:Title",
        "meta:ILTextType",
        "TagId",
        "meta:DOK",
        "meta:Language",
        "src:ItemNumber",
        "meta:ILWrittenResponseRubric",
        "src:Scope",
        "meta:GradeLevel"
      ]
    },
    "value": {
      "type": "array",
      "minItems": 1,
      "items": { "type": "string" }
    }
  },
  "required": [ "key", "value" ],
  "title": "Close Reader Metadata",
  "type": "object"
}
