diff options
Diffstat (limited to 'jb/models/event.py')
| -rw-r--r-- | jb/models/event.py | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/jb/models/event.py b/jb/models/event.py index c357772..c167420 100644 --- a/jb/models/event.py +++ b/jb/models/event.py @@ -11,13 +11,22 @@ class MTurkEvent(BaseModel): What AWS SNS will POST to our mturk_notifications endpoint (inside the request body) """ - event_type: EventTypeType = Field(example="AssignmentSubmitted") - event_timestamp: AwareDatetimeISO = Field(example="2025-10-16T18:45:51Z") - amt_hit_id: AMTBoto3ID = Field(example="12345678901234567890") + event_type: EventTypeType = Field( + json_schema_extra={"example": "AssignmentSubmitted"} + ) + event_timestamp: AwareDatetimeISO = Field( + json_schema_extra={"example": "2025-10-16T18:45:51Z"} + ) + amt_hit_id: AMTBoto3ID = Field( + json_schema_extra={"example": "12345678901234567890"} + ) amt_assignment_id: str = Field( - max_length=64, example="1234567890123456789012345678901234567890" + max_length=64, + json_schema_extra={"example": "1234567890123456789012345678901234567890"}, + ) + amt_hit_type_id: AMTBoto3ID = Field( + json_schema_extra={"example": "09876543210987654321"} ) - amt_hit_type_id: AMTBoto3ID = Field(example="09876543210987654321") @classmethod def from_sns(cls, data: Dict): |
