{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$id": "https://artifacts.apis.io/folio/json-schema/folio-central-server-patron-types-dto-schema.json",
  "title": "centralServerPatronTypesDTO",
  "description": "Patron types collection from all configured central servers",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-central-server-configuration-api-openapi.yml#/components/schemas/centralServerPatronTypesDTO",
  "type": "object",
  "properties": {
    "centralServerPatronTypes": {
      "description": "List of patron types per central server",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "#/$defs/patronTypesPerCentralServerDTO"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "additionalProperties": false,
  "required": [
    "centralServerPatronTypes"
  ],
  "$defs": {
    "patronType": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "Patron type details",
      "type": "object",
      "properties": {
        "centralPatronType": {
          "description": "Patron type",
          "type": "integer"
        },
        "description": {
          "description": "Patron type description",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "centralPatronType",
        "description"
      ]
    },
    "patronTypesPerCentralServerDTO": {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description": "Central server patron types",
      "type": "object",
      "properties": {
        "centralServerId": {
          "description": "Central server id",
          "type": "string",
          "format": "uuid"
        },
        "centralServerCode": {
          "description": "Central server code",
          "type": "string",
          "maxLength": 5
        },
        "patronTypes": {
          "description": "List of patron types for this central server",
          "type": "array",
          "items": {
            "type": "object",
            "$ref": "#/$defs/patronType"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "centralServerId",
        "centralServerCode",
        "patronTypes"
      ]
    }
  }
}