Skip to content

Commit a5d6e18

Browse files
[GENERATE] Pydantic models from JSON Schema
1 parent 863af50 commit a5d6e18

File tree

2 files changed

+8
-8
lines changed
  • generated/python/datadoc_model/datadoc_model

2 files changed

+8
-8
lines changed

generated/python/datadoc_model/datadoc_model/all_optional/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: metadata-container-json-schema.json
3-
# timestamp: 2025-09-02T11:41:11+00:00
3+
# timestamp: 2025-09-02T11:54:53+00:00
44

55
from __future__ import annotations
66

generated/python/datadoc_model/datadoc_model/required/model.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: metadata-container-json-schema.json
3-
# timestamp: 2025-09-02T11:41:13+00:00
3+
# timestamp: 2025-09-02T11:54:55+00:00
44

55
from __future__ import annotations
66

@@ -299,13 +299,13 @@ class Variable(DatadocBaseModel):
299299
pseudonymization: Optional[Pseudonymization] = Field(
300300
None, description="A pseudonymized variable in the dataset."
301301
)
302-
unit_type: Optional[str] = Field(
303-
None,
302+
unit_type: str = Field(
303+
...,
304304
description="Unit Type which this variable pertains to. Values shall be codes from https://www.ssb.no/klass/klassifikasjoner/702. See Definitions of Unit Types https://www.ssb.no/en/metadata/definisjoner-av-statistiske-enheter",
305305
title="Unit type",
306306
)
307-
data_source: Optional[str] = Field(
308-
None,
307+
data_source: str = Field(
308+
...,
309309
description="The source of the data contained in this variable. Values shall be codes from https://www.ssb.no/klass/klassifikasjoner/712.",
310310
title="Data source",
311311
)
@@ -319,8 +319,8 @@ class Variable(DatadocBaseModel):
319319
description="Further clarification of the variables definition",
320320
title="Comment",
321321
)
322-
temporality_type: Optional[TemporalityTypeType] = Field(
323-
None, description="Temporality type of this variable.", title="Temporality type"
322+
temporality_type: TemporalityTypeType = Field(
323+
..., description="Temporality type of this variable.", title="Temporality type"
324324
)
325325
measurement_unit: Optional[str] = Field(
326326
None, description="Measurement unit", title="Measurement unit"

0 commit comments

Comments
 (0)