Skip to content

Commit

Permalink
Define default values for for SoftwareEvent types
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-f-cruz committed Jul 8, 2024
1 parent 7381863 commit 2b1364b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/DataSchemas/aind_behavior_services/data_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ class SoftwareEvent(BaseModel):
"""

name: str = Field(..., description="The name of the event")
timestamp: Optional[float] = Field(..., description="The timestamp of the event")
timestamp: Optional[float] = Field(default=None, description="The timestamp of the event")
timestamp_source: TimestampSource = Field(default=TimestampSource.NULL, description="The source of the timestamp")
frame_index: Optional[int] = Field(default=None, ge=0, description="The frame index of the event")
frame_timestamp: Optional[float] = Field(default=None, description="The timestamp of the frame")
data: Optional[Any] = Field(..., description="The data of the event")
data: Optional[Any] = Field(default=None, description="The data of the event")
data_type: DataType = Field(default=DataType.NULL, alias="dataType", description="The data type of the event")


Expand Down
6 changes: 3 additions & 3 deletions src/DataSchemas/schemas/aind_behavior_data_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"type": "string"
},
"timestamp": {
"default": null,
"description": "The timestamp of the event",
"oneOf": [
{
Expand Down Expand Up @@ -118,6 +119,7 @@
"title": "Frame Timestamp"
},
"data": {
"default": null,
"description": "The data of the event",
"oneOf": [
{},
Expand All @@ -138,9 +140,7 @@
}
},
"required": [
"name",
"timestamp",
"data"
"name"
],
"title": "SoftwareEvent",
"type": "object"
Expand Down

0 comments on commit 2b1364b

Please sign in to comment.