""" schemas: Alert message sent on fault detection """ alert_schema = { "type": "object", "properties": { "message_type": { "type": "string", "description": "Type of message", "example": "alert", "enum": ["alert"], }, "code": { "type": "integer", "description": "Alert code", "example": 345, }, "platform_ID": { "type": "string", "description": "Unique identifier for this platform", "example": "usvdecibel", }, "platform_timestamp": { "type": "string", "format": "date-time", "description": "Timestamp for onboard platform status message", "example": "2022-12-21T00:00:00Z", }, "subsystem": { "type": "string", "description": "System that generated the alert", "example": "Onboard Fault Monitor", }, "summary": { "type": "string", "description": "High level description of the alert", "example": "Steering Damage - Port Side", }, "details": { "type": "string", "description": "Detailed reason for the alert ", "example": "Discrepancy between rudder and actuator positions" + " : Rudder Pos=10.31°, Steering Actuator Pos=28.65°, Discrepancy=18.33°", }, "severity": { "type": "string", "description": "Severity level of alert", "example": "Alarm", "enum": ["Emergency", "Alarm", "Warning", "Caution"], }, }, "required": [ "message_type", "platform_ID", "code", "severity", ], }