@@ -5,7 +5,7 @@ This guide helps you work with Overture Maps Pydantic schemas - Python models th
55## Table of Contents
66
77- [ Quick Start] ( #quick-start )
8- - [ Core Concepts] ( #core -concepts )
8+ - [ Basic Concepts] ( #basic -concepts )
99 - [ Models and Inheritance] ( #models-and-inheritance )
1010 - [ Field Types] ( #field-types )
1111 - [ Field Enhancement] ( #field-enhancement )
@@ -40,8 +40,8 @@ from enum import Enum
4040# Pydantic essentials
4141from pydantic import BaseModel, Field
4242
43- # Overture core models
44- from overture.schema.core import OvertureFeature
43+ # Overture common models
44+ from overture.schema.common import OvertureFeature
4545from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
4646
4747# Validation system
@@ -54,7 +54,7 @@ from overture.schema.system.string import (
5454 NoWhitespaceString,
5555 StrippedString,
5656)
57- from overture.schema.core .types import ConfidenceScore
57+ from overture.schema.common .types import ConfidenceScore
5858from overture.schema.system.string import LanguageTag
5959
6060# Numeric primitives (use these instead of int/float)
@@ -100,7 +100,7 @@ class MyCustomType(BaseModel):
100100``` python
101101from typing import Annotated, Literal
102102from pydantic import Field
103- from overture.schema.core import OvertureFeature
103+ from overture.schema.common import OvertureFeature
104104from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
105105
106106class MyFeature (OvertureFeature[Literal[" my_theme" ], Literal[" my_type" ]]):
@@ -119,7 +119,7 @@ class MyFeature(OvertureFeature[Literal["my_theme"], Literal["my_type"]]):
119119
120120---
121121
122- ## Core Concepts
122+ ## Basic Concepts
123123
124124### Models and Inheritance
125125
@@ -151,7 +151,7 @@ class Address(BaseModel):
151151
152152``` python
153153from typing import Literal
154- from overture.schema.core import OvertureFeature
154+ from overture.schema.common import OvertureFeature
155155from overture.schema.system.primitive import float64
156156
157157class Building (OvertureFeature[Literal[" buildings" ], Literal[" building" ]]):
@@ -177,9 +177,9 @@ By specifying `OvertureFeature[Literal["buildings"], Literal["building"]]`, you'
177177
178178``` python
179179from typing import Literal
180- from overture.schema.core import OvertureFeature
181- from overture.schema.core .models import Stacked
182- from overture.schema.core .names import Named
180+ from overture.schema.common import OvertureFeature
181+ from overture.schema.common .models import Stacked
182+ from overture.schema.common .names import Named
183183from overture.schema.system.primitive import float64
184184
185185class Building (OvertureFeature[Literal[" buildings" ], Literal[" building" ]], Named , Stacked ):
@@ -647,7 +647,7 @@ The fundamental pattern is a direct reference where one feature "points to" anot
647647``` python
648648from typing import Annotated, Literal
649649from pydantic import Field
650- from overture.schema.core import OvertureFeature
650+ from overture.schema.common import OvertureFeature
651651from overture.schema.system.ref import Id, Reference, Relationship
652652
653653# COMPOSITION — part points to its whole
@@ -772,7 +772,7 @@ division_id: Id
772772``` python
773773from typing import Annotated, Literal
774774from pydantic import Field
775- from overture.schema.core import OvertureFeature
775+ from overture.schema.common import OvertureFeature
776776
777777# Base class with common fields
778778class TransportationSegment (OvertureFeature[Literal[" transportation" ], Literal[" segment" ]]):
@@ -999,7 +999,7 @@ class Contact(BaseModel):
999999
10001000Organize code by scope and avoid circular imports:
10011001
1002- ** Cross-theme shared** : ` overture-schema-core ` package
1002+ ** Cross-theme shared** : ` overture-schema-common ` package
10031003
10041004- Used by multiple themes (e.g., ` OvertureFeature ` , ` Names ` , ` Sources ` , ` Scope ` )
10051005
@@ -1028,7 +1028,7 @@ from enum import Enum
10281028from pydantic import BaseModel, ConfigDict, Field
10291029
10301030# Cross-theme imports
1031- from overture.schema.core import OvertureFeature
1031+ from overture.schema.common import OvertureFeature
10321032from overture.schema.system.field_constraint import UniqueItemsConstraint
10331033from overture.schema.system.model_constraint import no_extra_fields
10341034
@@ -1088,7 +1088,7 @@ properties:
10881088**Pydantic approach:**
10891089
10901090` ` ` python
1091- # In overture-schema-core /src/overture/schema/core /models.py
1091+ # In overture-schema-common /src/overture/schema/common /models.py
10921092@no_extra_fields
10931093class Address(BaseModel) :
10941094 " " " A postal address." " "
@@ -1131,7 +1131,7 @@ allOf:
11311131**Pydantic equivalent** uses **mixin classes**:
11321132
11331133` ` ` python
1134- # In core /models.py
1134+ # In common /models.py
11351135class Named(BaseModel):
11361136 """Properties defining the names of a feature."""
11371137 names: Names | None = None
@@ -1203,7 +1203,7 @@ class MyCustomType(BaseModel):
12031203` ` ` python models.py
12041204from typing import Annotated, Literal
12051205from pydantic import Field
1206- from overture.schema.core import OvertureFeature
1206+ from overture.schema.common import OvertureFeature
12071207from overture.schema.system.primitive import Geometry, GeometryType, GeometryTypeConstraint
12081208
12091209class MyFeature(OvertureFeature[Literal["my_theme"], Literal["my_type"]]):
@@ -1262,7 +1262,7 @@ class Contact(BaseModel):
12621262` ` ` python models.py
12631263from typing import Annotated, Literal
12641264from pydantic import Field
1265- from overture.schema.core import OvertureFeature
1265+ from overture.schema.common import OvertureFeature
12661266from overture.schema.system.primitive import float64
12671267from overture.schema.system.ref import Id, Reference, Relationship
12681268
@@ -1346,7 +1346,7 @@ class Status(str, Enum):
13461346from typing import Annotated, Literal
13471347from enum import Enum
13481348from pydantic import Field
1349- from overture.schema.core import OvertureFeature
1349+ from overture.schema.common import OvertureFeature
13501350from overture.schema.system.field_constraint import UniqueItemsConstraint
13511351from overture.schema.system.model_constraint import no_extra_fields
13521352from overture.schema.system.primitive import int32, float64
0 commit comments