From e4aa95849d8da249ad48bcd895c28b5e6b45b5f7 Mon Sep 17 00:00:00 2001 From: RobertIdeal Date: Tue, 14 Apr 2026 15:48:39 +0100 Subject: [PATCH 1/4] schema from api --- dist/openapi.json | 318 +++++++++++++++++++++++++++++++++++++++++++++- dist/openapi.yaml | 304 ++++++++++++++++++++++++++++++++++++++++++++ openapi.ts | 172 ++++++++++++++++++++++++- 3 files changed, 790 insertions(+), 4 deletions(-) diff --git a/dist/openapi.json b/dist/openapi.json index f795197..46faeb9 100644 --- a/dist/openapi.json +++ b/dist/openapi.json @@ -3780,7 +3780,7 @@ "Dataset": { "title": "Dataset", "type": "string", - "description": "Indicates the provenance of an address.\n\n - `paf` (GBR) Postcode Address File\n - `usps` (USA) USPS Zip+4\n - `mr` (GBR) Multiple Residence File\n - `nyb` (GBR) Not Yet Built File\n - `pafa` (GBR) Alias File\n - `pafw` (GBR) Welsh File\n - `ab` (GBR) AddressBase Core\n - `ecaf` (IRL) Eircode ECAF\n - `ecad` (IRL) Eircode ECAD\n - `herewe` (Western Europe) Western Europe Dataset\n - `heret` (Taiwan) Taiwan Dataset\n - `heresa` (South America) South America Dataset\n - `hereo` (Oceania) Oceania Dataset\n - `herena` (North America) North America Dataset\n - `herei` (India) India Dataset\n - `heremea` (Middle East and Africa) Middle East and Africa Dataset\n - `herem` (Macau) Macau Dataset\n - `herehk` (Hong Kong) Hong Kong Dataset\n - `hereee` (Eastern Europe) Eastern Europe Dataset\n - `hereap` (Asia Pacific) Asia Pacific Dataset\n - `gnaf` (AUS) Geoscape Geocoded National Address File\n - `kadaster` (NLD) Kadaster BAG 2.0 Address File\n - `kartverket` (NOR) Norway Dataset\n - `sdfi` (DNK) Denmark Dataset\n - `cannar` (CAN) Canada National Address Register Dataset\n - `fodbosa` (BEL) Belgium Dataset\n - `mois` (KOR) South Korea Dataset\n - `upujp` (JPN) Japan UPU Address File\n - `bev` (AUT) Austria Dataset", + "description": "Indicates the provenance of an address.\n\n - `paf` (GBR) Postcode Address File\n - `usps` (USA) USPS Zip+4\n - `mr` (GBR) Multiple Residence File\n - `nyb` (GBR) Not Yet Built File\n - `pafa` (GBR) Alias File\n - `pafw` (GBR) Welsh File\n - `ab` (GBR) AddressBase Core\n - `ecaf` (IRL) Eircode ECAF\n - `ecad` (IRL) Eircode ECAD\n - `herewe` (Western Europe) Western Europe Dataset\n - `heret` (Taiwan) Taiwan Dataset\n - `heresa` (South America) South America Dataset\n - `hereo` (Oceania) Oceania Dataset\n - `herena` (North America) North America Dataset\n - `herei` (India) India Dataset\n - `heremea` (Middle East and Africa) Middle East and Africa Dataset\n - `herem` (Macau) Macau Dataset\n - `herehk` (Hong Kong) Hong Kong Dataset\n - `hereee` (Eastern Europe) Eastern Europe Dataset\n - `hereap` (Asia Pacific) Asia Pacific Dataset\n - `gnaf` (AUS) Geoscape Geocoded National Address File\n - `kadaster` (NLD) Kadaster BAG 2.0 Address File\n - `kartverket` (NOR) Norway Dataset\n - `sdfi` (DNK) Denmark Dataset\n - `cannar` (CAN) Canada National Address Register Dataset\n - `fodbosa` (BEL) Belgium Dataset\n - `mois` (KOR) South Korea Dataset\n - `upujp` (JPN) Japan UPU Address File\n - `bev` (AUT) Austria Dataset\n - `swisstopo` (CHE) Switzerland and Liechtenstein Dataset", "enum": [ "paf", "pafw", @@ -3811,7 +3811,8 @@ "fodbosa", "mois", "upujp", - "bev" + "bev", + "swisstopo" ] }, "CountryISO": { @@ -9914,6 +9915,305 @@ } } }, + "SwisstopoAddress": { + "required": [ + "id", + "dataset", + "country", + "country_iso", + "country_iso_2", + "language", + "address", + "line_1", + "line_2", + "latitude", + "longitude", + "street_latitude", + "street_longitude", + "adr_egaid", + "geb_str_esid", + "bdg_egid", + "adr_edid", + "stn_label", + "adr_number", + "bdg_category", + "bdg_name", + "zip_label", + "com_fosnr", + "com_name", + "com_canton", + "adr_status", + "adr_official", + "adr_modified", + "adr_easting", + "adr_northing", + "str_esid", + "str_type", + "str_status", + "str_official", + "str_modified", + "str_easting", + "str_northing", + "str_parent", + "str_children", + "ortschaftsname", + "plz4", + "zusatzziffer", + "zip_id", + "gemeindename", + "bfs_nr", + "kantonskurzel", + "adressenanteil", + "e", + "n", + "sprache", + "validity" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/ID" + }, + "dataset": { + "type": "string", + "enum": [ + "swisstopo" + ] + }, + "country_iso": { + "description": " 3 letter country code (ISO 3166-1)\n", + "enum": [ + "CHE", + "LIE" + ] + }, + "country_iso_2": { + "type": "string", + "description": " 2 letter country code (ISO 3166-1)\n", + "enum": [ + "CH", + "LI" + ] + }, + "country": { + "type": "string", + "description": " Full country names (ISO 3166)\n", + "enum": [ + "Switzerland", + "Liechtenstein" + ] + }, + "language": { + "enum": [ + "de", + "fr", + "it", + "rm" + ], + "description": "Language represented by 2 letter ISO Code (639-1)\n" + }, + "address": { + "type": "string", + "description": "Full address as a single string. Street name and house number/building name and building number, postal code and city\n", + "example": "40" + }, + "line_1": { + "type": "string", + "description": "First address line.\n\nCan be empty string `\"\"` if not present.\n", + "example": "Villa Kranzmayer" + }, + "line_2": { + "type": "string", + "description": "Second address line.\n\nCan be empty string `\"\"` if not present.\n", + "example": "Römerweg 48" + }, + "longitude": { + "$ref": "#/components/schemas/Longitude" + }, + "latitude": { + "$ref": "#/components/schemas/Latitude" + }, + "street_latitude": { + "oneOf": [ + { + "type": "string", + "description": "Empty string `\"\"` if not available" + }, + { + "type": "number", + "description": "Latitude of the street centroid (WGS84)", + "minimum": -90, + "maximum": 90 + } + ] + }, + "street_longitude": { + "oneOf": [ + { + "type": "string", + "description": "Empty string `\"\"` if not available" + }, + { + "type": "number", + "description": "Longitude of the street centroid (WGS84)", + "minimum": -180, + "maximum": 180 + } + ] + }, + "adr_egaid": { + "type": "number", + "description": "Federal building address identifier (Eidgenössischer Gebäudeadressidentifikator).\n" + }, + "geb_str_esid": { + "type": "number", + "description": "Street identifier from the building register linking the address to a street in the street register.\n" + }, + "bdg_egid": { + "type": "number", + "description": "Federal building identifier (Eidgenössischer Gebäudeidentifikator).\n" + }, + "adr_edid": { + "type": "number", + "description": "Entrance identifier within the building.\n" + }, + "stn_label": { + "type": "string", + "description": "Street name label.\n" + }, + "adr_number": { + "type": "string", + "description": "House/address number (e.g. `\"12\"`, `\"12A\"`).\n\nCan be empty string `\"\"` if not present.\n" + }, + "bdg_category": { + "type": "string", + "description": "Building category from the Federal Building and Dwelling Register (GWR).\n" + }, + "bdg_name": { + "type": "string", + "description": "Building name.\n\nCan be empty string `\"\"` if not present.\n" + }, + "zip_label": { + "type": "string", + "description": "Postal code and locality label (e.g. `\"8001 Zürich\"`).\n" + }, + "com_fosnr": { + "type": "number", + "description": "Federal municipality number assigned by the Federal Statistical Office (FSO/BFS).\n" + }, + "com_name": { + "type": "string", + "description": "Municipality name.\n" + }, + "com_canton": { + "type": "string", + "description": "Canton abbreviation (e.g. `\"ZH\"`, `\"BE\"`).\n\nCan be empty string `\"\"` if not present.\n" + }, + "adr_status": { + "type": "string", + "description": "Address status from the GWR.\n" + }, + "adr_official": { + "type": "boolean", + "description": "Whether the address is an official address.\n" + }, + "adr_modified": { + "type": "string", + "description": "Date the address record was last modified.\n" + }, + "adr_easting": { + "type": "string", + "description": "Easting coordinate of the address in the Swiss coordinate system CH1903+/LV95.\n" + }, + "adr_northing": { + "type": "string", + "description": "Northing coordinate of the address in the Swiss coordinate system CH1903+/LV95.\n" + }, + "str_esid": { + "type": "number", + "description": "Street identifier from the street register (Strassenverzeichnis).\n" + }, + "str_type": { + "type": "string", + "description": "Street type.\n" + }, + "str_status": { + "type": "string", + "description": "Street status.\n" + }, + "str_official": { + "type": "boolean", + "description": "Whether the street name is official.\n" + }, + "str_modified": { + "type": "string", + "description": "Date the street record was last modified.\n" + }, + "str_easting": { + "type": "string", + "description": "Easting coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95.\n" + }, + "str_northing": { + "type": "string", + "description": "Northing coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95.\n" + }, + "str_parent": { + "type": "string", + "description": "Parent street identifier.\n\nCan be empty string `\"\"` if not present.\n" + }, + "str_children": { + "type": "string", + "description": "Child street identifiers.\n\nCan be empty string `\"\"` if not present.\n" + }, + "ortschaftsname": { + "type": "string", + "description": "Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis).\n" + }, + "plz4": { + "type": "number", + "description": "4-digit Swiss postal code.\n" + }, + "zusatzziffer": { + "type": "number", + "description": "Additional digit disambiguating postal codes that share the same 4-digit code.\n" + }, + "zip_id": { + "type": "number", + "description": "Unique identifier for the postal code record.\n" + }, + "gemeindename": { + "type": "string", + "description": "Municipality name (Gemeindename).\n" + }, + "bfs_nr": { + "type": "number", + "description": "Federal municipality number assigned by the Federal Statistical Office (BFS-Nr).\n" + }, + "kantonskurzel": { + "type": "string", + "description": "Canton abbreviation (e.g. `\"ZH\"`, `\"GE\"`).\n\nCan be empty string `\"\"` if not present.\n" + }, + "adressenanteil": { + "type": "string", + "description": "Proportion of addresses belonging to this locality record.\n" + }, + "e": { + "type": "string", + "description": "Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95.\n" + }, + "n": { + "type": "string", + "description": "Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95.\n" + }, + "sprache": { + "type": "string", + "description": "Language of the record (e.g. `\"de\"`, `\"fr\"`, `\"it\"`, `\"rm\"`).\n" + }, + "validity": { + "type": "string", + "description": "Validity period of the postal code record.\n" + } + } + }, "GbrGlobalAddress": { "title": "Global Address", "description": "Global (non-UK) address in the UK address format", @@ -10066,6 +10366,9 @@ }, { "$ref": "#/components/schemas/BevAddress" + }, + { + "$ref": "#/components/schemas/SwisstopoAddress" } ] }, @@ -10880,6 +11183,7 @@ "mois", "upujp", "bev", + "swisstopo", "gbrcleanse", "uspscleanse" ], @@ -11048,6 +11352,11 @@ "description": "Austria: BEV Address File", "example": true }, + "swisstopo": { + "type": "boolean", + "description": "Switzerland and Liechtenstein: Swisstopo Address File", + "example": true + }, "gbrcleanse": { "type": "boolean", "description": "UK GBR Cleanse", @@ -11459,6 +11768,11 @@ "description": "Austria: BEV Address File", "example": true }, + "swisstopo": { + "type": "boolean", + "description": "Switzerland and Liechtenstein: Swisstopo Address File", + "example": true + }, "ab": { "type": "boolean", "description": "UK AddressBase dataset", diff --git a/dist/openapi.yaml b/dist/openapi.yaml index 7233051..8c5e626 100644 --- a/dist/openapi.yaml +++ b/dist/openapi.yaml @@ -3141,6 +3141,7 @@ components: - `mois` (KOR) South Korea Dataset - `upujp` (JPN) Japan UPU Address File - `bev` (AUT) Austria Dataset + - `swisstopo` (CHE) Switzerland and Liechtenstein Dataset enum: - paf - pafw @@ -3172,6 +3173,7 @@ components: - mois - upujp - bev + - swisstopo CountryISO: title: ISO Country Code (3) type: string @@ -4269,6 +4271,7 @@ components: minLength: 1 post_county_id: type: string + nullable: true description: Post County ID example: '10098783' maxLength: 10 @@ -9562,6 +9565,297 @@ components: type: string description: | Name of the census district + SwisstopoAddress: + required: + - id + - dataset + - country + - country_iso + - country_iso_2 + - language + - address + - line_1 + - line_2 + - latitude + - longitude + - street_latitude + - street_longitude + - adr_egaid + - geb_str_esid + - bdg_egid + - adr_edid + - stn_label + - adr_number + - bdg_category + - bdg_name + - zip_label + - com_fosnr + - com_name + - com_canton + - adr_status + - adr_official + - adr_modified + - adr_easting + - adr_northing + - str_esid + - str_type + - str_status + - str_official + - str_modified + - str_easting + - str_northing + - str_parent + - str_children + - ortschaftsname + - plz4 + - zusatzziffer + - zip_id + - gemeindename + - bfs_nr + - kantonskurzel + - adressenanteil + - e + - 'n' + - sprache + - validity + properties: + id: + $ref: '#/components/schemas/ID' + dataset: + type: string + enum: + - swisstopo + country_iso: + description: |2 + 3 letter country code (ISO 3166-1) + enum: + - CHE + - LIE + country_iso_2: + type: string + description: |2 + 2 letter country code (ISO 3166-1) + enum: + - CH + - LI + country: + type: string + description: |2 + Full country names (ISO 3166) + enum: + - Switzerland + - Liechtenstein + language: + enum: + - de + - fr + - it + - rm + description: | + Language represented by 2 letter ISO Code (639-1) + address: + type: string + description: | + Full address as a single string. Street name and house number/building name and building number, postal code and city + example: '40' + line_1: + type: string + description: | + First address line. + + Can be empty string `""` if not present. + example: Villa Kranzmayer + line_2: + type: string + description: | + Second address line. + + Can be empty string `""` if not present. + example: Römerweg 48 + longitude: + $ref: '#/components/schemas/Longitude' + latitude: + $ref: '#/components/schemas/Latitude' + street_latitude: + oneOf: + - type: string + description: Empty string `""` if not available + - type: number + description: Latitude of the street centroid (WGS84) + minimum: -90 + maximum: 90 + street_longitude: + oneOf: + - type: string + description: Empty string `""` if not available + - type: number + description: Longitude of the street centroid (WGS84) + minimum: -180 + maximum: 180 + adr_egaid: + type: number + description: | + Federal building address identifier (Eidgenössischer Gebäudeadressidentifikator). + geb_str_esid: + type: number + description: | + Street identifier from the building register linking the address to a street in the street register. + bdg_egid: + type: number + description: | + Federal building identifier (Eidgenössischer Gebäudeidentifikator). + adr_edid: + type: number + description: | + Entrance identifier within the building. + stn_label: + type: string + description: | + Street name label. + adr_number: + type: string + description: | + House/address number (e.g. `"12"`, `"12A"`). + + Can be empty string `""` if not present. + bdg_category: + type: string + description: | + Building category from the Federal Building and Dwelling Register (GWR). + bdg_name: + type: string + description: | + Building name. + + Can be empty string `""` if not present. + zip_label: + type: string + description: | + Postal code and locality label (e.g. `"8001 Zürich"`). + com_fosnr: + type: number + description: | + Federal municipality number assigned by the Federal Statistical Office (FSO/BFS). + com_name: + type: string + description: | + Municipality name. + com_canton: + type: string + description: | + Canton abbreviation (e.g. `"ZH"`, `"BE"`). + + Can be empty string `""` if not present. + adr_status: + type: string + description: | + Address status from the GWR. + adr_official: + type: boolean + description: | + Whether the address is an official address. + adr_modified: + type: string + description: | + Date the address record was last modified. + adr_easting: + type: string + description: | + Easting coordinate of the address in the Swiss coordinate system CH1903+/LV95. + adr_northing: + type: string + description: | + Northing coordinate of the address in the Swiss coordinate system CH1903+/LV95. + str_esid: + type: number + description: | + Street identifier from the street register (Strassenverzeichnis). + str_type: + type: string + description: | + Street type. + str_status: + type: string + description: | + Street status. + str_official: + type: boolean + description: | + Whether the street name is official. + str_modified: + type: string + description: | + Date the street record was last modified. + str_easting: + type: string + description: | + Easting coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95. + str_northing: + type: string + description: | + Northing coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95. + str_parent: + type: string + description: | + Parent street identifier. + + Can be empty string `""` if not present. + str_children: + type: string + description: | + Child street identifiers. + + Can be empty string `""` if not present. + ortschaftsname: + type: string + description: | + Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis). + plz4: + type: number + description: | + 4-digit Swiss postal code. + zusatzziffer: + type: number + description: | + Additional digit disambiguating postal codes that share the same 4-digit code. + zip_id: + type: number + description: | + Unique identifier for the postal code record. + gemeindename: + type: string + description: | + Municipality name (Gemeindename). + bfs_nr: + type: number + description: | + Federal municipality number assigned by the Federal Statistical Office (BFS-Nr). + kantonskurzel: + type: string + description: | + Canton abbreviation (e.g. `"ZH"`, `"GE"`). + + Can be empty string `""` if not present. + adressenanteil: + type: string + description: | + Proportion of addresses belonging to this locality record. + e: + type: string + description: | + Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. + 'n': + type: string + description: | + Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. + sprache: + type: string + description: | + Language of the record (e.g. `"de"`, `"fr"`, `"it"`, `"rm"`). + validity: + type: string + description: | + Validity period of the postal code record. GbrGlobalAddress: title: Global Address description: Global (non-UK) address in the UK address format @@ -9674,6 +9968,7 @@ components: - $ref: '#/components/schemas/MoisAddress' - $ref: '#/components/schemas/UpujpAddress' - $ref: '#/components/schemas/BevAddress' + - $ref: '#/components/schemas/SwisstopoAddress' postcode_outward: type: string description: Not available for non-UK addresses @@ -10319,6 +10614,7 @@ components: - mois - upujp - bev + - swisstopo - gbrcleanse - uspscleanse properties: @@ -10453,6 +10749,10 @@ components: type: boolean description: 'Austria: BEV Address File' example: true + swisstopo: + type: boolean + description: 'Switzerland and Liechtenstein: Swisstopo Address File' + example: true gbrcleanse: type: boolean description: UK GBR Cleanse @@ -10787,6 +11087,10 @@ components: type: boolean description: 'Austria: BEV Address File' example: true + swisstopo: + type: boolean + description: 'Switzerland and Liechtenstein: Swisstopo Address File' + example: true ab: type: boolean description: UK AddressBase dataset diff --git a/openapi.ts b/openapi.ts index 8ea0146..98df865 100644 --- a/openapi.ts +++ b/openapi.ts @@ -1135,6 +1135,7 @@ export interface components { * - `mois` (KOR) South Korea Dataset * - `upujp` (JPN) Japan UPU Address File * - `bev` (AUT) Austria Dataset + * - `swisstopo` (CHE) Switzerland and Liechtenstein Dataset * @enum {string} */ Dataset: @@ -1167,7 +1168,8 @@ export interface components { | "fodbosa" | "mois" | "upujp" - | "bev"; + | "bev" + | "swisstopo"; /** * ISO Country Code (3) * @description 3 letter country code (ISO 3166-1) @@ -5877,6 +5879,161 @@ export interface components { /** @description Name of the census district */ zaehlsprengelname: string; }; + SwisstopoAddress: { + id: components["schemas"]["ID"]; + /** @enum {string} */ + dataset: "swisstopo"; + /** + * @description 3 letter country code (ISO 3166-1) + * + * @enum {undefined} + */ + country_iso: "CHE" | "LIE"; + /** + * @description 2 letter country code (ISO 3166-1) + * + * @enum {string} + */ + country_iso_2: "CH" | "LI"; + /** + * @description Full country names (ISO 3166) + * + * @enum {string} + */ + country: "Switzerland" | "Liechtenstein"; + /** + * @description Language represented by 2 letter ISO Code (639-1) + * + * @enum {undefined} + */ + language: "de" | "fr" | "it" | "rm"; + /** + * @description Full address as a single string. Street name and house number/building name and building number, postal code and city + * + * @example 40 + */ + address: string; + /** + * @description First address line. + * + * Can be empty string `""` if not present. + * + * @example Villa Kranzmayer + */ + line_1: string; + /** + * @description Second address line. + * + * Can be empty string `""` if not present. + * + * @example Römerweg 48 + */ + line_2: string; + longitude: components["schemas"]["Longitude"]; + latitude: components["schemas"]["Latitude"]; + street_latitude: string | number; + street_longitude: string | number; + /** @description Federal building address identifier (Eidgenössischer Gebäudeadressidentifikator). */ + adr_egaid: number; + /** @description Street identifier from the building register linking the address to a street in the street register. */ + geb_str_esid: number; + /** @description Federal building identifier (Eidgenössischer Gebäudeidentifikator). */ + bdg_egid: number; + /** @description Entrance identifier within the building. */ + adr_edid: number; + /** @description Street name label. */ + stn_label: string; + /** + * @description House/address number (e.g. `"12"`, `"12A"`). + * + * Can be empty string `""` if not present. + */ + adr_number: string; + /** @description Building category from the Federal Building and Dwelling Register (GWR). */ + bdg_category: string; + /** + * @description Building name. + * + * Can be empty string `""` if not present. + */ + bdg_name: string; + /** @description Postal code and locality label (e.g. `"8001 Zürich"`). */ + zip_label: string; + /** @description Federal municipality number assigned by the Federal Statistical Office (FSO/BFS). */ + com_fosnr: number; + /** @description Municipality name. */ + com_name: string; + /** + * @description Canton abbreviation (e.g. `"ZH"`, `"BE"`). + * + * Can be empty string `""` if not present. + */ + com_canton: string; + /** @description Address status from the GWR. */ + adr_status: string; + /** @description Whether the address is an official address. */ + adr_official: boolean; + /** @description Date the address record was last modified. */ + adr_modified: string; + /** @description Easting coordinate of the address in the Swiss coordinate system CH1903+/LV95. */ + adr_easting: string; + /** @description Northing coordinate of the address in the Swiss coordinate system CH1903+/LV95. */ + adr_northing: string; + /** @description Street identifier from the street register (Strassenverzeichnis). */ + str_esid: number; + /** @description Street type. */ + str_type: string; + /** @description Street status. */ + str_status: string; + /** @description Whether the street name is official. */ + str_official: boolean; + /** @description Date the street record was last modified. */ + str_modified: string; + /** @description Easting coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95. */ + str_easting: string; + /** @description Northing coordinate of the street centroid in the Swiss coordinate system CH1903+/LV95. */ + str_northing: string; + /** + * @description Parent street identifier. + * + * Can be empty string `""` if not present. + */ + str_parent: string; + /** + * @description Child street identifiers. + * + * Can be empty string `""` if not present. + */ + str_children: string; + /** @description Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis). */ + ortschaftsname: string; + /** @description 4-digit Swiss postal code. */ + plz4: number; + /** @description Additional digit disambiguating postal codes that share the same 4-digit code. */ + zusatzziffer: number; + /** @description Unique identifier for the postal code record. */ + zip_id: number; + /** @description Municipality name (Gemeindename). */ + gemeindename: string; + /** @description Federal municipality number assigned by the Federal Statistical Office (BFS-Nr). */ + bfs_nr: number; + /** + * @description Canton abbreviation (e.g. `"ZH"`, `"GE"`). + * + * Can be empty string `""` if not present. + */ + kantonskurzel: string; + /** @description Proportion of addresses belonging to this locality record. */ + adressenanteil: string; + /** @description Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. */ + e: string; + /** @description Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. */ + n: string; + /** @description Language of the record (e.g. `"de"`, `"fr"`, `"it"`, `"rm"`). */ + sprache: string; + /** @description Validity period of the postal code record. */ + validity: string; + }; /** * Global Address * @description Global (non-UK) address in the UK address format @@ -5944,7 +6101,8 @@ export interface components { | components["schemas"]["FodbosaAddress"] | components["schemas"]["MoisAddress"] | components["schemas"]["UpujpAddress"] - | components["schemas"]["BevAddress"]; + | components["schemas"]["BevAddress"] + | components["schemas"]["SwisstopoAddress"]; /** * @description Not available for non-UK addresses * @enum {string} @@ -6625,6 +6783,11 @@ export interface components { * @example true */ bev: boolean; + /** + * @description Switzerland and Liechtenstein: Swisstopo Address File + * @example true + */ + swisstopo: boolean; /** * @description UK GBR Cleanse * @example true @@ -6917,6 +7080,11 @@ export interface components { * @example true */ bev?: boolean; + /** + * @description Switzerland and Liechtenstein: Swisstopo Address File + * @example true + */ + swisstopo?: boolean; /** * @description UK AddressBase dataset * @example false From fb5635511e245303aea78eadfe4c964e4e40a090 Mon Sep 17 00:00:00 2001 From: RobertIdeal Date: Wed, 15 Apr 2026 12:14:34 +0100 Subject: [PATCH 2/4] =?UTF-8?q?Changing=20spelling=20to=20kantonsk=C3=BCrz?= =?UTF-8?q?el?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/openapi.json | 4 ++-- dist/openapi.yaml | 4 ++-- openapi.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/openapi.json b/dist/openapi.json index 46faeb9..c544bb4 100644 --- a/dist/openapi.json +++ b/dist/openapi.json @@ -9962,7 +9962,7 @@ "zip_id", "gemeindename", "bfs_nr", - "kantonskurzel", + "kantonskürzel", "adressenanteil", "e", "n", @@ -10188,7 +10188,7 @@ "type": "number", "description": "Federal municipality number assigned by the Federal Statistical Office (BFS-Nr).\n" }, - "kantonskurzel": { + "kantonskürzel": { "type": "string", "description": "Canton abbreviation (e.g. `\"ZH\"`, `\"GE\"`).\n\nCan be empty string `\"\"` if not present.\n" }, diff --git a/dist/openapi.yaml b/dist/openapi.yaml index 8c5e626..4ccdcdf 100644 --- a/dist/openapi.yaml +++ b/dist/openapi.yaml @@ -9612,7 +9612,7 @@ components: - zip_id - gemeindename - bfs_nr - - kantonskurzel + - kantonskürzel - adressenanteil - e - 'n' @@ -9830,7 +9830,7 @@ components: type: number description: | Federal municipality number assigned by the Federal Statistical Office (BFS-Nr). - kantonskurzel: + kantonskürzel: type: string description: | Canton abbreviation (e.g. `"ZH"`, `"GE"`). diff --git a/openapi.ts b/openapi.ts index 98df865..a5d8642 100644 --- a/openapi.ts +++ b/openapi.ts @@ -6022,7 +6022,7 @@ export interface components { * * Can be empty string `""` if not present. */ - kantonskurzel: string; + kantonskürzel: string; /** @description Proportion of addresses belonging to this locality record. */ adressenanteil: string; /** @description Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. */ From ece264d1c6710e85ca799efd9c7ad800445b6380 Mon Sep 17 00:00:00 2001 From: RobertIdeal Date: Mon, 20 Apr 2026 10:52:06 +0100 Subject: [PATCH 3/4] description changes --- dist/openapi.json | 7 ++++--- dist/openapi.yaml | 6 +++--- openapi.ts | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dist/openapi.json b/dist/openapi.json index c544bb4..3c04439 100644 --- a/dist/openapi.json +++ b/dist/openapi.json @@ -4927,6 +4927,7 @@ }, "post_county_id": { "type": "string", + "nullable": true, "description": "Post County ID", "example": "10098783", "maxLength": 10, @@ -10013,7 +10014,7 @@ }, "address": { "type": "string", - "description": "Full address as a single string. Street name and house number/building name and building number, postal code and city\n", + "description": "House number, `\"\"` if not present.\n", "example": "40" }, "line_1": { @@ -10198,11 +10199,11 @@ }, "e": { "type": "string", - "description": "Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95.\n" + "description": "Longitude of the locality centroid in WGS84 decimal degrees.\n" }, "n": { "type": "string", - "description": "Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95.\n" + "description": "Latitude of the locality centroid in WGS84 decimal degrees.\n" }, "sprache": { "type": "string", diff --git a/dist/openapi.yaml b/dist/openapi.yaml index 4ccdcdf..e163cf7 100644 --- a/dist/openapi.yaml +++ b/dist/openapi.yaml @@ -9656,7 +9656,7 @@ components: address: type: string description: | - Full address as a single string. Street name and house number/building name and building number, postal code and city + House number, `""` if not present. example: '40' line_1: type: string @@ -9843,11 +9843,11 @@ components: e: type: string description: | - Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. + Longitude of the locality centroid in WGS84 decimal degrees. 'n': type: string description: | - Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. + Latitude of the locality centroid in WGS84 decimal degrees. sprache: type: string description: | diff --git a/openapi.ts b/openapi.ts index a5d8642..e18c437 100644 --- a/openapi.ts +++ b/openapi.ts @@ -2143,7 +2143,7 @@ export interface components { * @description Post County ID * @example 10098783 */ - post_county_id?: string; + post_county_id?: string | null; /** * @description NUA means "non-unique address". * @@ -5908,7 +5908,7 @@ export interface components { */ language: "de" | "fr" | "it" | "rm"; /** - * @description Full address as a single string. Street name and house number/building name and building number, postal code and city + * @description House number, `""` if not present. * * @example 40 */ @@ -6025,9 +6025,9 @@ export interface components { kantonskürzel: string; /** @description Proportion of addresses belonging to this locality record. */ adressenanteil: string; - /** @description Easting coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. */ + /** @description Longitude of the locality centroid in WGS84 decimal degrees. */ e: string; - /** @description Northing coordinate of the locality centroid in the Swiss coordinate system CH1903+/LV95. */ + /** @description Latitude of the locality centroid in WGS84 decimal degrees. */ n: string; /** @description Language of the record (e.g. `"de"`, `"fr"`, `"it"`, `"rm"`). */ sprache: string; From 456cff9d86ff7b999e555ebe95c76dd21b12decc Mon Sep 17 00:00:00 2001 From: RobertIdeal Date: Thu, 30 Apr 2026 14:40:14 +0100 Subject: [PATCH 4/4] Schema changes to match address --- dist/openapi.json | 25 +++++++++++++++---------- dist/openapi.yaml | 25 +++++++++++++++---------- openapi.ts | 34 ++++++++++++++++++---------------- 3 files changed, 48 insertions(+), 36 deletions(-) diff --git a/dist/openapi.json b/dist/openapi.json index 3c04439..3508c7d 100644 --- a/dist/openapi.json +++ b/dist/openapi.json @@ -9924,15 +9924,13 @@ "country_iso", "country_iso_2", "language", + "canton", "address", "line_1", "line_2", "latitude", "longitude", - "street_latitude", - "street_longitude", "adr_egaid", - "geb_str_esid", "bdg_egid", "adr_edid", "stn_label", @@ -9955,8 +9953,6 @@ "str_modified", "str_easting", "str_northing", - "str_parent", - "str_children", "ortschaftsname", "plz4", "zusatzziffer", @@ -9964,9 +9960,6 @@ "gemeindename", "bfs_nr", "kantonskürzel", - "adressenanteil", - "e", - "n", "sprache", "validity" ], @@ -10012,6 +10005,10 @@ ], "description": "Language represented by 2 letter ISO Code (639-1)\n" }, + "canton": { + "type": "string", + "description": "Canton abbreviation, `\"\"` if not present.\n" + }, "address": { "type": "string", "description": "House number, `\"\"` if not present.\n", @@ -10167,26 +10164,32 @@ }, "ortschaftsname": { "type": "string", + "nullable": true, "description": "Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis).\n" }, "plz4": { - "type": "number", + "type": "string", + "nullable": true, "description": "4-digit Swiss postal code.\n" }, "zusatzziffer": { - "type": "number", + "type": "string", + "nullable": true, "description": "Additional digit disambiguating postal codes that share the same 4-digit code.\n" }, "zip_id": { "type": "number", + "nullable": true, "description": "Unique identifier for the postal code record.\n" }, "gemeindename": { "type": "string", + "nullable": true, "description": "Municipality name (Gemeindename).\n" }, "bfs_nr": { "type": "number", + "nullable": true, "description": "Federal municipality number assigned by the Federal Statistical Office (BFS-Nr).\n" }, "kantonskürzel": { @@ -10207,10 +10210,12 @@ }, "sprache": { "type": "string", + "nullable": true, "description": "Language of the record (e.g. `\"de\"`, `\"fr\"`, `\"it\"`, `\"rm\"`).\n" }, "validity": { "type": "string", + "nullable": true, "description": "Validity period of the postal code record.\n" } } diff --git a/dist/openapi.yaml b/dist/openapi.yaml index e163cf7..02eaff7 100644 --- a/dist/openapi.yaml +++ b/dist/openapi.yaml @@ -9573,15 +9573,13 @@ components: - country_iso - country_iso_2 - language + - canton - address - line_1 - line_2 - latitude - longitude - - street_latitude - - street_longitude - adr_egaid - - geb_str_esid - bdg_egid - adr_edid - stn_label @@ -9604,8 +9602,6 @@ components: - str_modified - str_easting - str_northing - - str_parent - - str_children - ortschaftsname - plz4 - zusatzziffer @@ -9613,9 +9609,6 @@ components: - gemeindename - bfs_nr - kantonskürzel - - adressenanteil - - e - - 'n' - sprache - validity properties: @@ -9653,6 +9646,10 @@ components: - rm description: | Language represented by 2 letter ISO Code (639-1) + canton: + type: string + description: | + Canton abbreviation, `""` if not present. address: type: string description: | @@ -9808,26 +9805,32 @@ components: Can be empty string `""` if not present. ortschaftsname: type: string + nullable: true description: | Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis). plz4: - type: number + type: string + nullable: true description: | 4-digit Swiss postal code. zusatzziffer: - type: number + type: string + nullable: true description: | Additional digit disambiguating postal codes that share the same 4-digit code. zip_id: type: number + nullable: true description: | Unique identifier for the postal code record. gemeindename: type: string + nullable: true description: | Municipality name (Gemeindename). bfs_nr: type: number + nullable: true description: | Federal municipality number assigned by the Federal Statistical Office (BFS-Nr). kantonskürzel: @@ -9850,10 +9853,12 @@ components: Latitude of the locality centroid in WGS84 decimal degrees. sprache: type: string + nullable: true description: | Language of the record (e.g. `"de"`, `"fr"`, `"it"`, `"rm"`). validity: type: string + nullable: true description: | Validity period of the postal code record. GbrGlobalAddress: diff --git a/openapi.ts b/openapi.ts index e18c437..9aac42d 100644 --- a/openapi.ts +++ b/openapi.ts @@ -5907,6 +5907,8 @@ export interface components { * @enum {undefined} */ language: "de" | "fr" | "it" | "rm"; + /** @description Canton abbreviation, `""` if not present. */ + canton: string; /** * @description House number, `""` if not present. * @@ -5931,12 +5933,12 @@ export interface components { line_2: string; longitude: components["schemas"]["Longitude"]; latitude: components["schemas"]["Latitude"]; - street_latitude: string | number; - street_longitude: string | number; + street_latitude?: string | number; + street_longitude?: string | number; /** @description Federal building address identifier (Eidgenössischer Gebäudeadressidentifikator). */ adr_egaid: number; /** @description Street identifier from the building register linking the address to a street in the street register. */ - geb_str_esid: number; + geb_str_esid?: number; /** @description Federal building identifier (Eidgenössischer Gebäudeidentifikator). */ bdg_egid: number; /** @description Entrance identifier within the building. */ @@ -5998,25 +6000,25 @@ export interface components { * * Can be empty string `""` if not present. */ - str_parent: string; + str_parent?: string; /** * @description Child street identifiers. * * Can be empty string `""` if not present. */ - str_children: string; + str_children?: string; /** @description Locality name from the Official Directory of Localities (Amtliches Ortschaftenverzeichnis). */ - ortschaftsname: string; + ortschaftsname: string | null; /** @description 4-digit Swiss postal code. */ - plz4: number; + plz4: string | null; /** @description Additional digit disambiguating postal codes that share the same 4-digit code. */ - zusatzziffer: number; + zusatzziffer: string | null; /** @description Unique identifier for the postal code record. */ - zip_id: number; + zip_id: number | null; /** @description Municipality name (Gemeindename). */ - gemeindename: string; + gemeindename: string | null; /** @description Federal municipality number assigned by the Federal Statistical Office (BFS-Nr). */ - bfs_nr: number; + bfs_nr: number | null; /** * @description Canton abbreviation (e.g. `"ZH"`, `"GE"`). * @@ -6024,15 +6026,15 @@ export interface components { */ kantonskürzel: string; /** @description Proportion of addresses belonging to this locality record. */ - adressenanteil: string; + adressenanteil?: string; /** @description Longitude of the locality centroid in WGS84 decimal degrees. */ - e: string; + e?: string; /** @description Latitude of the locality centroid in WGS84 decimal degrees. */ - n: string; + n?: string; /** @description Language of the record (e.g. `"de"`, `"fr"`, `"it"`, `"rm"`). */ - sprache: string; + sprache: string | null; /** @description Validity period of the postal code record. */ - validity: string; + validity: string | null; }; /** * Global Address