Skip to content

Commit 2812b60

Browse files
committed
update pydantic models with admin_level field
1 parent 7742dde commit 2812b60

File tree

3 files changed

+23
-0
lines changed
  • packages/overture-schema-divisions-theme/src/overture/schema/divisions

3 files changed

+23
-0
lines changed

packages/overture-schema-divisions-theme/src/overture/schema/divisions/division/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,13 @@ class Division(
117117
The default parent division is the parent division as seen from the default political perspective, if there is one, and is otherwise chosen somewhat arbitrarily. The hierarchies property can be used to inspect the exhaustive list of parent divisions.""",
118118
),
119119
] = None
120+
admin_level: Annotated[
121+
int32 | None,
122+
Field(
123+
ge=0,
124+
description="Integer representing this division's position in its country's administrative hierarchy, where lower numbers correspond to higher level administrative units.",
125+
),
126+
] = None
120127

121128
# Optional
122129

packages/overture-schema-divisions-theme/src/overture/schema/divisions/division_area/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
Geometry,
1717
GeometryType,
1818
GeometryTypeConstraint,
19+
int32,
1920
)
2021
from overture.schema.system.ref import Id, Reference, Relationship
2122
from overture.schema.system.string import CountryCodeAlpha2, RegionCode
@@ -93,3 +94,10 @@ class DivisionArea(
9394
description="ISO 3166-2 principal subdivision code of the division this area belongs to.",
9495
),
9596
] = None
97+
admin_level: Annotated[
98+
int32 | None,
99+
Field(
100+
ge=0,
101+
description="Integer representing this division's position in its country's administrative hierarchy, where lower numbers correspond to higher level administrative units.",
102+
),
103+
] = None

packages/overture-schema-divisions-theme/src/overture/schema/divisions/division_boundary/models.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
Geometry,
1919
GeometryType,
2020
GeometryTypeConstraint,
21+
int32,
2122
)
2223
from overture.schema.system.ref import Id, Reference, Relationship
2324
from overture.schema.system.string import CountryCodeAlpha2, RegionCode
@@ -115,6 +116,13 @@ class DivisionBoundary(
115116
present on boundaries between different principal subdivisions or countries.""",
116117
),
117118
] = None
119+
admin_level: Annotated[
120+
int32 | None,
121+
Field(
122+
ge=0,
123+
description="Integer representing the shared administrative level of the divisions on either side of this boundary.",
124+
),
125+
] = None
118126
is_disputed: Annotated[
119127
bool | None,
120128
Field(

0 commit comments

Comments
 (0)