{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "clozeformulav2.schema.json",
  "$ref": "learnosity-question-base.schema.json",
  "title": "Cloze Formula V2 Question",
  "description": "Schema for the clozeformulaV2 question type.",
  "type": "object",
  "required": ["stimulus","template","response_container","ui_style","is_math","response_containers","show_hints_button"],
  "properties": {
    "stimulus": {
      "type": "string",
      "description": "The question text or prompt."
    },
    "template": {
      "type": "string",
      "description": "The template string with response placeholders."
    },
    "type": {
      "type": "string",
      "const": "clozeformulaV2",
      "description": "The question type identifier."
    },
    "response_container": {
      "type": "object",
      "properties": {
        "template": { "type": "string" }
      },
      "required": ["template"],
      "additionalProperties": true
    },
      "ui_style": {
        "allOf": [
          { "$ref": "ui_style.schema.json" },
          { 
            "properties": {
              "type": { "const": "floating-keyboard" }
            },
            "required": ["type"]
          }
        ]
      },
    "validation": {
      "$ref": "clozeformula-validation.schema.json"
    },
    "is_math": { "type": "boolean" },
    "response_containers": {
      "type": "array",
      "items": {},
      "description": "Array of response containers (optional)"
    },
    "show_hints_button": { "type": "boolean" }
  },
  "additionalProperties": true
}
