{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/folio/json-schema/folio-authority-heading-type-dto-collection-schema.json",
  "title": "authorityHeadingTypeDtoCollection",
  "description": "A collection of authority heading types",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/folio-authority-heading-type-api-openapi.yml#/components/schemas/authorityHeadingTypeDtoCollection",
  "properties": {
    "headingTypes": {
      "description": "List of authority heading types",
      "items": {
        "$ref": "#/$defs/authorityHeadingTypeDto"
      },
      "type": "array"
    },
    "totalRecords": {
      "description": "Total amount of records",
      "type": "integer"
    }
  },
  "required": [
    "headingTypes",
    "totalRecords"
  ],
  "type": "object",
  "$defs": {
    "authorityHeadingTypeDto": {
      "description": "An authority heading type",
      "properties": {
        "id": {
          "description": "Unique ID of the authority heading type; a UUID",
          "format": "uuid",
          "type": "string",
          "x-fqm-value-getter": ":sourceAlias.id"
        },
        "name": {
          "description": "Name of the authority heading type",
          "type": "string",
          "x-fqm-essential": true,
          "x-fqm-id-column-name": "code",
          "x-fqm-visible-by-default": true,
          "x-fqm-value-getter": ":sourceAlias.name",
          "x-fqm-value-source-api": {
            "path": "authority-heading-types",
            "valueJsonPath": "$.headingTypes[?(@.queryable == true)].code",
            "labelJsonPath": "$.headingTypes[?(@.queryable == true)].name"
          }
        },
        "code": {
          "description": "Code of the authority heading type",
          "type": "string",
          "x-fqm-value-getter": ":sourceAlias.code",
          "x-fqm-essential": true
        },
        "queryable": {
          "description": "Whether this heading type is queryable",
          "type": "boolean",
          "x-fqm-value-getter": ":sourceAlias.queryable"
        }
      },
      "required": [
        "code",
        "name"
      ],
      "type": "object"
    }
  }
}