Skip to content

Commit

Permalink
Added to the schema extra of event_descriptor to allow precision to b…
Browse files Browse the repository at this point in the history
…e null
  • Loading branch information
evalott100 committed Jun 30, 2023
1 parent 77c633a commit 0a18c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion event_model/documents/event_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ class Configuration(TypedDict):
"patternProperties": {"^([^./]+)$": {"$ref": "#/definitions/DataType"}},
"additionalProperties": False,
},
"DataKey": {"properties": {"units": {"type": ["string", "null"]}}},
"DataKey": {
"properties": {
"units": {"type": ["string", "null"]},
"precision": {"type": ["integer", "null"]},
}
},
},
"additionalProperties": False,
}
Expand Down
5 changes: 4 additions & 1 deletion event_model/schemas/event_descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
"precision": {
"title": "Precision",
"description": "Number of digits after decimal place if a floating point number",
"type": "integer"
"type": [
"integer",
"null"
]
},
"shape": {
"title": "Shape",
Expand Down

0 comments on commit 0a18c04

Please sign in to comment.