{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entur/json-schema/entur-entitlement-required-list-response-schema.json",
  "title": "EntitlementRequiredListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-entitlement-required-api-openapi.yml#/components/schemas/EntitlementRequiredListResponse",
  "required": [
    "instances",
    "page",
    "size",
    "totalCount"
  ],
  "type": "object",
  "properties": {
    "instances": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/EntitlementRequired"
      }
    },
    "totalCount": {
      "type": "integer",
      "description": "Total number of EntitlementRequired instances."
    },
    "page": {
      "type": "integer",
      "description": "Current zero-based page number."
    },
    "size": {
      "type": "integer",
      "description": "Number of instances per page."
    }
  },
  "$defs": {
    "EntitlementRequired": {
      "required": [
        "entitlementType",
        "fareProductRef",
        "id",
        "name"
      ],
      "type": "object",
      "properties": {
        "id": {
          "pattern": "^([A-Z]{3}):EntitlementRequired:([0-9A-Za-z_\\-]*)$",
          "type": "string",
          "description": "The NeTEx ID of this EntitlementRequired."
        },
        "name": {
          "$ref": "#/$defs/LocalizedString"
        },
        "entitlementType": {
          "type": "string",
          "description": "The type of entitlement that is required.",
          "enum": [
            "SINGLE_TRIP",
            "PERIOD_PASS",
            "DAY_PASS",
            "CARNET"
          ]
        },
        "fareProductRef": {
          "pattern": "^([A-Z]{3}):PreassignedFareProduct:([0-9A-Za-z_\\-]*)$",
          "type": "string",
          "description": "Reference to the fare product that satisfies this entitlement."
        }
      }
    },
    "LocalizedString": {
      "type": "array",
      "items": {
        "required": [
          "lang",
          "value"
        ],
        "type": "object",
        "properties": {
          "lang": {
            "pattern": "^[a-z]{2}-[A-Z]{2}$",
            "type": "string",
            "description": "BCP-47 language tag (e.g., 'nb-NO', 'en-GB')."
          },
          "value": {
            "type": "string",
            "description": "The localized string value for the specified lang."
          }
        }
      }
    }
  }
}