{
  "$id": "plaintext.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "PlainText Question Schema",
  "description": "Schema for PlainText question type, supporting plain text input with spellcheck and word limits.",
  "type": "object",
  "required": ["stimulus", "type", "validation", "spellcheck", "show_word_limit"],
  "properties": {
    "type": { "const": "plaintext" },
    "stimulus": {
      "type": "string",
      "description": "The question prompt or stimulus."
    },
    "spellcheck": {
      "type": "boolean",
      "description": "Whether to enable spellcheck for the text input"
    },
    "show_word_limit": {
      "type": "string",
      "enum": ["on", "off", "always"],
      "description": "Whether to show word count limit to students"
    },
    "validation": {
      "type": "object",
      "properties": {
        "max_score": {
          "type": "number",
          "minimum": 0,
          "description": "Maximum score for the plaintext response"
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}