{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/allianz-engagement-survey/json-schema/allianz-engagement-survey-response-list-schema.json",
  "title": "ResponseList",
  "description": "Paginated list of anonymized survey responses",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/allianz-engagement-survey-responses-api-openapi.yml#/components/schemas/ResponseList",
  "type": "object",
  "properties": {
    "total": {
      "type": "integer",
      "description": "Total number of responses"
    },
    "items": {
      "type": "array",
      "description": "List of anonymized response records",
      "items": {
        "$ref": "#/$defs/SurveyResponse"
      }
    }
  },
  "$defs": {
    "Answer": {
      "title": "Answer",
      "type": "object",
      "description": "An individual question answer within a survey response",
      "properties": {
        "question_id": {
          "type": "string",
          "description": "Identifier of the question being answered"
        },
        "score": {
          "type": "integer",
          "description": "Numeric score on a 1-5 Likert scale",
          "minimum": 1,
          "maximum": 5
        },
        "text_response": {
          "type": "string",
          "description": "Open text response for free-text questions"
        }
      }
    },
    "SurveyResponse": {
      "title": "SurveyResponse",
      "type": "object",
      "description": "An anonymized survey response submission",
      "properties": {
        "response_id": {
          "type": "string",
          "description": "Unique identifier for the response"
        },
        "survey_id": {
          "type": "string",
          "description": "Survey this response belongs to"
        },
        "submitted_at": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the response was submitted"
        },
        "answers": {
          "type": "array",
          "description": "List of question answers",
          "items": {
            "$ref": "#/$defs/Answer"
          }
        }
      }
    }
  }
}