diff --git a/examples/addresses/address_all_missing_address_levels.yaml b/examples/addresses/address_all_missing_address_levels.yaml new file mode 100644 index 00000000..8e29e9ce --- /dev/null +++ b/examples/addresses/address_all_missing_address_levels.yaml @@ -0,0 +1,17 @@ +--- +id: overture:addresses:addres:1 +type: Feature +geometry: + type: Point + coordinates: [-71.2086153, 42.3373725] +properties: + theme: addresses + type: address + version: 0 + country: US + address_levels: + - {} + - {} + postcode: '02459' + street: COMMONWEALTH AVE + number: '1000' diff --git a/examples/addresses/address_missing_address_level.yaml b/examples/addresses/address_missing_address_level.yaml new file mode 100644 index 00000000..aec28775 --- /dev/null +++ b/examples/addresses/address_missing_address_level.yaml @@ -0,0 +1,17 @@ +--- +id: overture:addresses:addres:1 +type: Feature +geometry: + type: Point + coordinates: [-71.2086153, 42.3373725] +properties: + theme: addresses + type: address + version: 0 + country: US + address_levels: + - value: MA + - {} + postcode: '02459' + street: COMMONWEALTH AVE + number: '1000' diff --git a/schema/addresses/address.yaml b/schema/addresses/address.yaml index 59292038..e416a8cf 100644 --- a/schema/addresses/address.yaml +++ b/schema/addresses/address.yaml @@ -62,6 +62,11 @@ properties: # JSON Schema: Top-level object properties. and the municipality. In other countries there might be only one. Other countries could have three or more. The array is ordered with the highest levels first. + + Note: when a level is not known - most likely because the data provider + has not supplied it and we have not derived it from another source, + the array element container must be present, but the "value" field + should be omitted type: array items: { "$ref": "#/$defs/propertyContainers/addressLevelContainer" } minItems: 1 @@ -76,7 +81,6 @@ properties: # JSON Schema: Top-level object properties. levels with per-country rules indicating which parts of a country's address goes to which numbered level. type: object - required: ["value"] properties: value: type: string