{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/companydata-dk/json-schema/companydata-dk-app-routers-reference-postal-code-list-response-schema.json",
  "title": "PostalCodeListResponse",
  "description": "Response with list of postal codes.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/companydata-dk-reference-data-api-openapi.yml#/components/schemas/app__routers__reference__PostalCodeListResponse",
  "properties": {
    "data": {
      "items": {
        "$ref": "#/$defs/PostalCode"
      },
      "type": "array",
      "title": "Data",
      "description": "List of postal codes"
    },
    "meta": {
      "additionalProperties": true,
      "type": "object",
      "title": "Meta",
      "description": "Response metadata"
    }
  },
  "type": "object",
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "PostalCode": {
      "properties": {
        "code": {
          "type": "string",
          "title": "Code",
          "description": "4-digit postal code"
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "Postal code district name"
        },
        "municipality_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Municipality Code",
          "description": "Municipality code"
        },
        "municipality_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Municipality Name",
          "description": "Municipality name"
        }
      },
      "type": "object",
      "required": [
        "code",
        "name"
      ],
      "title": "PostalCode",
      "description": "Postal code data for dropdown/filter."
    }
  }
}