Skip to content

Commit

Permalink
Add FLOAT to DataType (#35)
Browse files Browse the repository at this point in the history
It seems this was forgotten when the JSON Schema was written, it's defined on Confluence and exists in the legacy Pydantic model.
  • Loading branch information
mmwinther authored Jan 5, 2024
1 parent 2d490c9 commit 3d03a99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,8 @@ public enum DataType {
STRING("STRING"),
INTEGER("INTEGER"),
DATETIME("DATETIME"),
BOOLEAN("BOOLEAN");
BOOLEAN("BOOLEAN"),
FLOAT("FLOAT");
private final String value;
private final static Map<String, Variable.DataType> CONSTANTS = new HashMap<String, Variable.DataType>();

Expand Down
3 changes: 2 additions & 1 deletion 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-01-04T07:49:11+00:00
# timestamp: 2024-01-04T14:47:13+00:00

from __future__ import annotations

Expand Down Expand Up @@ -37,6 +37,7 @@ class DataType(str, Enum):
INTEGER = "INTEGER"
DATETIME = "DATETIME"
BOOLEAN = "BOOLEAN"
FLOAT = "FLOAT"


class VariableRole(str, Enum):
Expand Down
2 changes: 1 addition & 1 deletion generated/python/datadoc_model/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ssb-datadoc-model"
version = "4.1.0"
version = "4.1.1"
description = "Data Model for use in Statistics Norway's Metadata system"
authors = ["Statistics Norway <[email protected]>"]
license = "MIT"
Expand Down
3 changes: 2 additions & 1 deletion src/datadoc/datadoc-json-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@
"STRING",
"INTEGER",
"DATETIME",
"BOOLEAN"
"BOOLEAN",
"FLOAT"
]
},
"variable_role": {
Expand Down

0 comments on commit 3d03a99

Please sign in to comment.