""" schema: Observation Message sent by platforms when points of interest are found. """ hits_schema = { "type": "object", "properties": { "latitude": { "type": "number", "format": "float", "description": "Identified y-coordinate of point of interest", "example": 178.2, }, "longitude": { "type": "number", "format": "float", "description": "Identified x-coordinate of point of interest", "example": -10.122, }, "quality_of_point": { "type": "number", "format": "float", "description": "Quality/strength of points from features of" + " interest identified by platform.", # TODO: DEFINE FORMAT. "example": 0.98, }, }, "required": ["latitude", "longitude"], } observation_schema = { "type": "object", "properties": { "message_type": { "type": "string", "description": "Type of message", "example": "observation", "enum": ["observation"], }, "platform_ID": { "type": "string", "description": "Unique identifier for this platform", "example": "reav-x-1", }, "points_of_interest": { "type": "array", "items": hits_schema, "description": "Points from features of interest identified by" + " platform if any found.", # TODO: DEFINE FORMAT. }, "region_surveyed": { "nullable": True, "description": "Region surveyed by given platform." + " GEOJSON", # TODO: DEFINE FORMAT. "example": "", }, "additional_data": { "description": "Placeholder field for any additional data", "example": {"sensor_payload": False}, }, }, "required": ["message_type", "platform_ID"], }