Skip to content
Open
21 changes: 21 additions & 0 deletions counterexamples/divisions/division/bad-admin-level.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
id: counterexample:division:bad-admin-level
type: Feature
geometry:
type: Point
coordinates: [0, 0]
properties:
theme: divisions
type: division
version: 0
subtype: country
names:
primary: Invalid admin_level Example
country: ZZ
hierarchies:
- - division_id: counterexample:division:bad-admin-level
subtype: country
name: Invalid admin_level Example
admin_level: -1
ext_expected_errors:
- "minimum: got -1, want 0"
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ properties:
name: A division with an invalid capital_division_id property.
norms:
driving_side: right
admin_level: 0
capital_division_ids: [' ']
ext_expected_errors:
- "' ' does not match pattern"
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-country.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ properties:
name: A division with an invalid country property.
norms:
driving_side: left
admin_level: 0
ext_expected_errors:
- "maxLength: got 3, want 2"
- "'ZZZ' does not match pattern"
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ properties:
name: A division with invalid geometry coordinates.
norms:
driving_side: left
admin_level: 0
ext_expected_errors:
- "properties/coordinates/items/type]: got string, want number"
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-geometry-type.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ properties:
name: A division with an invalid geometry type.
norms:
driving_side: left
admin_level: 0
ext_expected_errors:
- "value must be 'Point'"
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-hierarchies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ properties:
- division_id: counterexample:division:bad-hierarchies-county
name: bar
- []
admin_level: 2
norms:
driving_side: left
ext_expected_errors:
Expand Down
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-names.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ properties:
name: A division with invalid names
norms:
driving_side: left
admin_level: 0
ext_expected_errors:
- "/propertyDefinitions/allNames/properties/primary/type]: got null, want string"
- additional properties 'a-b-c-d-e-f-g-h-i-j-k-l' not allowed
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-norms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ properties:
norms:
driving_side: middle
random_property: 10
admin_level: 0
ext_expected_errors:
- "value must be one of 'left', 'right'"
- "/properties/properties/properties/norms/unevaluatedProperties]: false schema"
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ properties:
name: A division with an invalid parent division ID
norms:
driving_side: right
admin_level: 1
parent_division_id: " "
ext_expected_errors:
- "' ' does not match pattern"
1 change: 1 addition & 0 deletions counterexamples/divisions/division/bad-region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ properties:
- division_id: counterexample:division:bad-region
subtype: region
name: A division with an invalid ISO 3166-2 primary subdivision code ('region')
admin_level: 1
parent_division_id: counterexample:division:some-parent-division
ext_expected_errors:
- "minLength: got 3, want 4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ properties:
- - division_id: counterexample:division:parent-not-allowed-on-country
subtype: country
name: A country division that has a parent ID, which is not allowed
admin_level: 0
parent_division_id: counterexample:division:some-parent-division
ext_expected_errors:
- "[S#/properties/properties/allOf/3/then]: not failed"
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,6 @@ properties:
- division_id: counterexample:division:parent-required-on-sub-country
subtype: region
name: A sub-country division that lacks a parent ID
admin_level: 1
ext_expected_errors:
- "missing property 'parent_division_id'"
1 change: 1 addition & 0 deletions counterexamples/divisions/division_area/bad-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ properties:
names:
primary: A division area with an invalid class property.
country: ZZ
admin_level: 0
ext_expected_errors:
- "value must be one of 'land', 'maritime'"
1 change: 1 addition & 0 deletions counterexamples/divisions/division_area/bad-country.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ properties:
names:
primary: A division area with an invalid country property.
country: ZZZ
admin_level: 0
ext_expected_errors:
- "maxLength: got 3, want 2"
- "'ZZZ' does not match pattern"
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ properties:
names:
primary: A division area with an invalid division ID property.
country: ZZ
admin_level: 0
ext_expected_errors:
- "'abc ' does not match pattern"
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ properties:
names:
primary: A division area with invalid geometry coordinates.
country: ZZ
admin_level: 0
ext_expected_errors:
- got number, want array
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ properties:
names:
primary: A division area with an invalid geometry type.
country: ZZ
admin_level: 0
ext_expected_errors:
- "/properties/type/enum]: value must be 'Polygon'"
- "/properties/type/enum]: value must be 'MultiPolygon'"
1 change: 1 addition & 0 deletions counterexamples/divisions/division_area/bad-is-land.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ properties:
division_id: counterexample:division_boundary:some-division
is_land: yes
country: ZZ
admin_level: 0
ext_expected_errors:
- "is_land/type]: got string, want boolean"
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ properties:
is_territorial: no
is_land: true
country: ZZ
admin_level: 0
ext_expected_errors:
- "is_territorial/type]: got string, want boolean"
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ properties:
theme: divisions
type: division_area
version: 0
subtype: country
division_id: counterexample:division_boundary:some-division
is_territorial: false
country: ZZ
subtype: country
division_id: counterexample:division_boundary:some-division
is_territorial: false
country: ZZ
admin_level: 0
1 change: 1 addition & 0 deletions counterexamples/divisions/division_area/bad-region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ properties:
primary: A division area with an invalid ISO 3166-2 primary subdivision code ('region')
country: ZZ
region: this just seems wrong
admin_level: 1
ext_expected_errors:
- "/propertyDefinitions/iso3166_2SubdivisionCode/maxLength]: maxLength: got 21, want 6"
- "'this just seems wrong' does not match pattern"
1 change: 1 addition & 0 deletions counterexamples/divisions/division_boundary/bad-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 0
subtype: country
admin_level: 0
class: foo
divisions: ["example:division:country:left", "example:division:country:right"]
is_disputed: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: region
admin_level: 1
class: land
country: "XX"
division_ids: ["example:division:country:left", "example:division:country:right", "example:division:country:right", 123]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: county
admin_level: 2
country: "XX"
class: land
division_ids: ["example:division:country:lonelylhsdivision"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 0
subtype: country
admin_level: 0
division_ids: ["example:division:country:left", "example:division:country:right"]
is_land: yes
is_territorial: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ properties:
type: division_boundary
version: 0
subtype: country
admin_level: 0
division_ids: ["example:division:country:left", "example:division:country:right"]
class: land
is_territorial: no
is_land: true
country: ZZ
ext_expected_errors:
- "is_territorial/type]: got string, want boolean"
- "is_territorial/type]: got string, want boolean"
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ properties:
type: division_boundary
version: 1
subtype: country
admin_level: 0
is_land: true
is_territorial: true
class: land
division_ids: ["example:division:country:left", "example:division:country:right"]
ext_expected_errors:
- "division_boundary.yaml#/properties/properties/oneOf]: oneOf failed, subschemas 0, 1 matched"
- "division_boundary.yaml#/properties/properties/oneOf]: oneOf failed, subschemas 0, 1 matched"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 0
subtype: macroregion
admin_level: 1
is_territorial: true
is_land: false
country: "XX"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ properties:
type: division_boundary
version: 0
subtype: region
admin_level: 1
is_territorial: true
is_land: false
class: land
division_ids: ["example:division:country:left", "example:division:country:right"]
ext_expected_errors:
- "missing property 'country'"
- "missing property 'country'"
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ properties:
is_territorial: false
is_land: true
subtype: macrocounty
admin_level: 2
country: "XX"
ext_expected_errors:
- "missing property 'division_ids'"
1 change: 1 addition & 0 deletions examples/divisions/division/country.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ properties:
name: United States
norms:
driving_side: right
admin_level: 0
capital_division_ids: [ example:division:locality:washington_dc ]
1 change: 1 addition & 0 deletions examples/divisions/division/dependency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ properties:
name: United States
norms:
driving_side: right
admin_level: 1
capital_division_ids: [ example:division:locality:san_juan ]
parent_division_id: example:division:country:us
1 change: 1 addition & 0 deletions examples/divisions/division/multiple_capital_division.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ properties:
- division_id: example:division:region:pl-04
subtype: region
name: Woj Kujawsko-Pomorskie
admin_level: 1
capital_division_ids: [ example:division:locality:bydgoszcz, example:division:locality:torun]
parent_division_id: example:division:country:pl
1 change: 1 addition & 0 deletions examples/divisions/division/perspectives.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ properties:
- - division_id: example:perspectives:trnc
subtype: country
name: Kuzey Kıbrıs
admin_level: 0
perspectives:
mode: accepted_by
countries: [TR]
1 change: 1 addition & 0 deletions examples/divisions/division/population.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ properties:
- division_id: example:division:region:ca-on
subtype: region
name: Ontario
admin_level: 1
capital_division_ids: [ example:division:locality:toronto ]
parent_division_id: example:division:country:ca
population: 13550900
1 change: 1 addition & 0 deletions examples/divisions/division/region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ properties:
- division_id: example:division:region:us-ny
subtype: region
name: New York
admin_level: 1
capital_division_ids: [ example:division:locality:albany ]
parent_division_id: example:division:country:us
1 change: 1 addition & 0 deletions examples/divisions/division_area/country_land.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,4 @@ properties:
names:
primary: United States
country: US
admin_level: 0
1 change: 1 addition & 0 deletions examples/divisions/division_area/country_maritime.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,4 @@ properties:
common:
en: Finland
country: FI
admin_level: 0
3 changes: 2 additions & 1 deletion examples/divisions/division_area/is_land.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,9 @@ properties:
is_land: true
is_territorial: false
country: US
admin_level: 0
version: 0
class: land
division_id: example:division:country:us
names:
primary: United States
primary: United States
1 change: 1 addition & 0 deletions examples/divisions/division_area/is_territorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ properties:
is_territorial: true
is_land: false
country: FI
admin_level: 0
version: 0
class: land
division_id: example:division:country:fi
Expand Down
1 change: 1 addition & 0 deletions examples/divisions/division_area/region_land.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,4 @@ properties:
primary: Umbria
country: IT
region: IT-55
admin_level: 1
1 change: 1 addition & 0 deletions examples/divisions/division_boundary/disputed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: country
admin_level: 0
class: land
is_land: true
is_territorial: false
Expand Down
1 change: 1 addition & 0 deletions examples/divisions/division_boundary/disputed_both.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: country
admin_level: 0
class: land
is_land: true
is_territorial: false
Expand Down
3 changes: 2 additions & 1 deletion examples/divisions/division_boundary/is_land.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ properties:
type: division_boundary
version: 1
subtype: country
admin_level: 0
is_land: true
is_territorial: false
class: land
division_ids: ["example:division:country:left", "example:division:country:right"]
division_ids: ["example:division:country:left", "example:division:country:right"]
3 changes: 2 additions & 1 deletion examples/divisions/division_boundary/is_territorial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ properties:
type: division_boundary
version: 1
subtype: country
admin_level: 0
is_territorial: true
is_land: false
class: maritime
division_ids: ["example:division:country:left", "example:division:country:right"]
division_ids: ["example:division:country:left", "example:division:country:right"]
1 change: 1 addition & 0 deletions examples/divisions/division_boundary/land_county.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: region
admin_level: 1
class: land
country: "XX"
region: "XX-01"
Expand Down
1 change: 1 addition & 0 deletions examples/divisions/division_boundary/land_region.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ properties:
type: division_boundary
version: 1
subtype: region
admin_level: 1
class: land
country: "XX"
is_land: true
Expand Down
Loading
Loading