""" schema: platform-specific decoded status message (DRAFT) """ # from . import full_message_schema, api # from flask_restx import fields observation_schema = { "allOf": [{"$ref": "#/components/schemas/Message"}], "type": "object", "properties": { "platform_serial": { "description": "Serial of platform to sendign observations", "example": "ecosub-3", }, # "observation_type" ==> payloads tied to different types maybe? # properties of each observation? "points_of_interest": { "description": "Points from features of interest identified by" + " platform if any found. DEFINE FORMAT.", "example": "", }, "region_surveyed": { "description": "Region surveyed by given platform. DEFINE FORMAT." + " GEOJSON?", "example": "", }, "quality_of_points": { "description": "Quality/strength of points from features of interest" + " identified by platform. DEFINE FORMAT.", "example": 0.98, }, "additional_data": { "description": "Placeholder field for any additional data", "example": {"sensor_payload": False}, }, }, "required": ["platform_serial"], } # observation_schema = api.model( # "Observation", # { # "message": fields.Nested( # full_message_schema, # required=True, # description="Message header", # ), # "platform_serial": fields.String( # required=True, # description="Serial of platform to sendign observations", # example="ecosub-3", # ), # # "observation_type" ==> payloads tied to different types maybe? # # properties of each observation? # "points_of_interest": fields.Float( # required=False, # description="Points from features of interest identified by" # + " platform if any found. DEFINE FORMAT.", # example="", # ), # "region_surveyed": fields.Float( # required=False, # description="Region surveyed by given platform. DEFINE FORMAT." # + " GEOJSON?", # example="", # ), # "quality_of_points": fields.Float( # required=False, # description="Quality/strength of points from features of interest" # + " identified by platform. DEFINE FORMAT.", # example=0.98, # ), # "additional_data": fields.Raw( # required=False, # description="Placeholder field for any additional data", # example={"sensor_payload": False}, # ), # }, # )