{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "additionalProperties": false, "properties": { "schema_version": { "const": 2 }, "tasks": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "schema_version": { "const": 2 }, "module_id": { "type": "string", "minLength": 1, "maxLength": 200 }, "target_language": { "type": "string", "minLength": 1, "maxLength": 50 }, "course_version": { "const": "a1-v2" }, "cefr_level": { "const": "A1" }, "skill": { "enum": [ "grammar", "vocabulary", "listening", "reading", "speaking", "writing" ] }, "kind": { "enum": [ "choice", "short_text", "free_text", "repeat_sentence", "free_speech" ] }, "prompt": { "type": "string", "minLength": 1, "maxLength": 2000 }, "origin_module_key": { "type": "string", "minLength": 1, "maxLength": 200 }, "passage": { "type": "string", "minLength": 1, "maxLength": 10000 }, "audio_text": { "type": "string", "minLength": 1, "maxLength": 4000 }, "reference_text": { "type": "string", "minLength": 1, "maxLength": 500 }, "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "minLength": 1, "maxLength": 80 }, "label": { "type": "string", "minLength": 1, "maxLength": 1000 } }, "required": [ "id", "label" ] }, "maxItems": 6, "minItems": 2 }, "answer_key": { "type": "object", "additionalProperties": false, "properties": { "correct_option_id": { "type": "string", "minLength": 1, "maxLength": 80 }, "reference_answer": { "type": "string", "minLength": 1, "maxLength": 10000 }, "rubric": { "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 1000 }, "maxItems": 8, "minItems": 1 }, "explanation": { "type": "string", "minLength": 1, "maxLength": 4000 } }, "required": [ "rubric", "explanation" ] } }, "required": [ "schema_version", "module_id", "target_language", "course_version", "cefr_level", "skill", "kind", "prompt", "answer_key" ], "allOf": [ { "if": { "properties": { "skill": { "const": "listening" } } }, "then": { "required": [ "audio_text" ] } }, { "if": { "properties": { "skill": { "const": "reading" } } }, "then": { "required": [ "passage" ] } }, { "if": { "properties": { "kind": { "const": "choice" } } }, "then": { "required": [ "options" ], "properties": { "answer_key": { "required": [ "correct_option_id" ] } } }, "else": { "not": { "required": [ "options" ] } } }, { "if": { "properties": { "kind": { "const": "repeat_sentence" } } }, "then": { "required": [ "reference_text" ] } } ] }, "maxItems": 12, "minItems": 1 } }, "required": [ "schema_version", "tasks" ] }