Skip to content

Commit 1174a50

Browse files
authored
Merge pull request #79 from statisticsnorway/fix/stable-id-version
Stable identifier version is a date
2 parents cc812ac + 16318d8 commit 1174a50

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

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

Lines changed: 4 additions & 4 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-03T10:05:55+00:00
3+
# timestamp: 2025-12-03T08:38:27+00:00
44

55
from __future__ import annotations
66

@@ -53,7 +53,7 @@ class UseRestrictionItem(DatadocBaseModel):
5353

5454
class CustomTypeForDatasetMetadatum(DatadocBaseModel):
5555
key: Optional[str] = Field(None, description="Custom type KEY", title="Key")
56-
value: Optional[Union[str, list, dict[str, Any]]] = Field(
56+
value: Optional[Union[str, list[Any], dict[str, Any]]] = Field(
5757
None,
5858
description="Custom type VALUE (of type string, array or object).",
5959
title="Value",
@@ -88,7 +88,7 @@ class Pseudonymization(DatadocBaseModel):
8888
description="Type of stable identifier the variable was mapped to prior to pseudonymization.",
8989
title="Stable identifier type",
9090
)
91-
stable_identifier_version: Optional[str] = Field(
91+
stable_identifier_version: Optional[date] = Field(
9292
None,
9393
description="Version of stable identifier the variable was mapped to prior to pseudonymization.",
9494
title="Stable identifier version",
@@ -125,7 +125,7 @@ class SentinelValues(DatadocBaseModel):
125125

126126
class CustomTypeForVariableMetadatum(DatadocBaseModel):
127127
key: Optional[str] = Field(None, description="Custom type KEY", title="Key")
128-
value: Optional[Union[str, list, dict[str, Any]]] = Field(
128+
value: Optional[Union[str, list[Any], dict[str, Any]]] = Field(
129129
None,
130130
description="Custom type VALUE (of type string, array or object).",
131131
title="Value",

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

Lines changed: 4 additions & 4 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-03T10:05:57+00:00
3+
# timestamp: 2025-12-03T08:38:29+00:00
44

55
from __future__ import annotations
66

@@ -53,7 +53,7 @@ class UseRestrictionItem(DatadocBaseModel):
5353

5454
class CustomTypeForDatasetMetadatum(DatadocBaseModel):
5555
key: Optional[str] = Field(None, description="Custom type KEY", title="Key")
56-
value: Optional[Union[str, list, dict[str, Any]]] = Field(
56+
value: Optional[Union[str, list[Any], dict[str, Any]]] = Field(
5757
None,
5858
description="Custom type VALUE (of type string, array or object).",
5959
title="Value",
@@ -88,7 +88,7 @@ class Pseudonymization(DatadocBaseModel):
8888
description="Type of stable identifier the variable was mapped to prior to pseudonymization.",
8989
title="Stable identifier type",
9090
)
91-
stable_identifier_version: Optional[str] = Field(
91+
stable_identifier_version: Optional[date] = Field(
9292
None,
9393
description="Version of stable identifier the variable was mapped to prior to pseudonymization.",
9494
title="Stable identifier version",
@@ -125,7 +125,7 @@ class SentinelValues(DatadocBaseModel):
125125

126126
class CustomTypeForVariableMetadatum(DatadocBaseModel):
127127
key: Optional[str] = Field(None, description="Custom type KEY", title="Key")
128-
value: Optional[Union[str, list, dict[str, Any]]] = Field(
128+
value: Optional[Union[str, list[Any], dict[str, Any]]] = Field(
129129
None,
130130
description="Custom type VALUE (of type string, array or object).",
131131
title="Value",

generated/python/datadoc_model/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ssb-datadoc-model"
3-
version = "8.0.0"
3+
version = "8.0.1"
44
description = "Data Model for use in Statistics Norway's Metadata system"
55
authors = [{ name = "Statistics Norway", email = "metadata@ssb.no" }]
66
license = "MIT"

src/datadoc/datadoc-json-schema.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@
292292
"type": "string",
293293
"title": "Stable identifier version",
294294
"description": "Version of stable identifier the variable was mapped to prior to pseudonymization.",
295-
"$comment": "Only relevant when the variable is mapped to a stable identifier."
295+
"$comment": "Only relevant when the variable is mapped to a stable identifier.",
296+
"format": "date"
296297
},
297298
"encryption_algorithm": {
298299
"type": "string",

0 commit comments

Comments
 (0)