{
  "$id": "twigitem-comp.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$ref": "contentitem.schema.json",
  "title": "TwigItem Component",
  "description": "A question item that can contain various types of assessment questions",
  "type": "object",
  "additionalProperties": true,
  "required": [ "type" ],
  "properties": {
    "type": {
      "type": "string",
      "const": "twigitem",
      "description": "Should be always set to 'twigitem' to identify this as a twigitem component"
    },
    "feedback": {
      "type": [ "array", "null" ],
      "items": { "$ref": "questionfeedback.schema.json" },
      "description": "Optional array of feedback items or null"
    },
    "feedbacktemplate": {
      "type": "string",
      "description": "Feedback template of the Twigitem",
      "enum": [ "EdgeEXBasic", "EdgeEXAssessment", "EdgeEXAENoSMV", "EdgeEXAEAndSMV" ]
    },
    "answerexplanation": {
      "type": "object",
      "$ref": "questionanswerexplanation.schema.json"
    },
    "metadata": {
      "type": "array",
      "items": { "$ref": "twigitem-metadata.schema.json" },
      "uniqueItems": true
    }
  }
}
