Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "value" as required element of address_level #283

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions examples/addresses/address_all_missing_address_levels.yaml
Original file line number Diff line number Diff line change
@@ -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'
17 changes: 17 additions & 0 deletions examples/addresses/address_missing_address_level.yaml
Original file line number Diff line number Diff line change
@@ -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'
6 changes: 5 additions & 1 deletion schema/addresses/address.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading