Skip to content

Commit

Permalink
[GENERATE] Pydantic models from JSON Schema
Browse files Browse the repository at this point in the history
  • Loading branch information
dapla-bot[bot] committed Feb 21, 2024
1 parent aa47a00 commit b25d196
Showing 1 changed file with 4 additions and 28 deletions.
32 changes: 4 additions & 28 deletions generated/python/datadoc_model/datadoc_model/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by datamodel-codegen:
# filename: metadata-container-json-schema.json
# timestamp: 2024-02-08T15:06:13+00:00
# timestamp: 2024-02-21T08:51:44+00:00

from __future__ import annotations

Expand Down Expand Up @@ -56,30 +56,6 @@ class LanguageStringType(DatadocBaseModel):
nb: Optional[str] = None


class UnitType(str, Enum):
ARBEIDSULYKKE = "ARBEIDSULYKKE"
BOLIG = "BOLIG"
BYGNING = "BYGNING"
EIENDOM = "EIENDOM"
FAMILIE = "FAMILIE"
FORETAK = "FORETAK"
FYLKE = "FYLKE"
HAVNEANLOEP = "HAVNEANLOEP"
HUSHOLDNING = "HUSHOLDNING"
KJOERETOEY = "KJOERETOEY"
KOMMUNE = "KOMMUNE"
KURS = "KURS"
LOVBRUDD = "LOVBRUDD"
PERSON = "PERSON"
STAT = "STAT"
STORFE = "STORFE"
TRAFIKKULYKKE = "TRAFIKKULYKKE"
TRANSAKSJON = "TRANSAKSJON"
VARE_TJENESTE = "VARE_TJENESTE"
VERDIPAPIR = "VERDIPAPIR"
VIRKSOMHET = "VIRKSOMHET"


class TemporalityTypeType(str, Enum):
FIXED = "FIXED"
STATUS = "STATUS"
Expand Down Expand Up @@ -208,7 +184,7 @@ class Dataset(DatadocBaseModel):
description="Dataset version information in the form of descriptive text",
title="Version description",
)
unit_type: Optional[UnitType] = Field(
unit_type: Optional[str] = Field(
None,
description="Unit Type for data file, table or data set. See Definitions of Unit Types https://www.ssb.no/en/metadata/definisjoner-av-statistiske-enheter",
title="Unit type",
Expand Down Expand Up @@ -369,8 +345,8 @@ class DatadocMetadata(DatadocBaseModel):
percentage_complete: Optional[int] = Field(
None, description="Percentage of obligatory metadata fields populated."
)
document_version: Literal["2.0.0"] = Field(
"2.0.0", description="Version of this model"
document_version: Literal["2.1.0"] = Field(
"2.1.0", description="Version of this model"
)
dataset: Optional[Dataset] = None
variables: Optional[list[Variable]] = None
Expand Down

0 comments on commit b25d196

Please sign in to comment.