{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eightfold-ai/json-schema/eightfold-ai-question-template-schema-schema.json",
  "title": "QuestionTemplateSchema",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/eightfold-ai-question-api-openapi.yml#/components/schemas/QuestionTemplateSchema",
  "type": "object",
  "properties": {
    "templateType": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Template type"
    },
    "questions": {
      "readOnly": true,
      "description": "Ordered list of questions on the form",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/Question"
      }
    },
    "formGuide": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Intro/help text for the form"
    },
    "displayName": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Template display name"
    },
    "templateId": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "readOnly": true,
      "description": "Template ID"
    }
  },
  "$defs": {
    "Question": {
      "type": "object",
      "properties": {
        "options": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Options list for choice-style questions"
        },
        "placeholder": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Placeholder text for the input"
        },
        "validations": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Validation rules for the answer"
        },
        "questionId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "readOnly": true,
          "description": "Question ID"
        },
        "customData": {
          "type": [
            "object",
            "null"
          ],
          "readOnly": true,
          "description": "Question-type-specific config"
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Question input type (e.g. textarea, skill_rating)"
        },
        "label": {
          "type": [
            "string",
            "null"
          ],
          "readOnly": true,
          "description": "Question label shown to the user"
        },
        "required": {
          "type": [
            "boolean",
            "null"
          ],
          "readOnly": true,
          "description": "Whether an answer is required"
        }
      }
    }
  }
}