{
    "$id": "classification.schema.json",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "title": "Classification Question Schema",
    "description": "Schema for Classification question type, consistent with Learnosity standards.",
    "$ref": "learnosity-question-base.schema.json",
    "type": "object",
    "required": ["stimulus", "possible_responses", "duplicate_responses", "feedback_attempts", "ui_style", "is_math"],
    "properties": {
        "type": {
            "type": "string",
            "const": "classification",
            "description": "Question type identifier. Must be 'classification'."
        },
        "stimulus": {
            "type": "string",
            "description": "The question prompt or stimulus."
        },
        "possible_responses": {
            "type": "array",
            "items": { "type": "string" },
            "minItems": 1,
            "description": "List of possible responses for classification."
        },
        "duplicate_responses": {
            "type": "boolean",
            "description": "Allow duplicate responses in the answer set."
        },
        "feedback_attempts": {
            "type": ["integer", "string"],
            "description": "Number of attempts before showing feedback"
        },
        "ui_style": {
            "allOf": [
                { "$ref": "ui_style.schema.json" },
                { "required": ["possibility_list_position", "validation_stem_numeration", "column_titles"] }
            ]
        },
        "is_math": {
            "type": "boolean",
            "description": "Indicates if the question is math-related."
        }
    },
    "additionalProperties": true
}
