Skip to content

Commit

Permalink
made units optional again
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Oct 24, 2024
1 parent dd1731d commit 13ba9de
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/event_model/documents/event_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class DataKey(TypedDict):
str, Field(description="The source (ex piece of hardware) of the data.")
]
units: NotRequired[
Annotated[str, Field(description="Engineering units of the value")]
Annotated[Optional[str], Field(description="Engineering units of the value")]
]


Expand Down
9 changes: 8 additions & 1 deletion src/event_model/schemas/event_descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,14 @@
"units": {
"title": "Units",
"description": "Engineering units of the value",
"type": "string"
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
Expand Down

0 comments on commit 13ba9de

Please sign in to comment.