diff --git a/formats/survey.py b/formats/survey.py index f5f928c4d92f669fbc36d83e7f1e8532413bf7a0..c73dcd29c0564d63fa23fe422918dee3146951a6 100644 --- a/formats/survey.py +++ b/formats/survey.py @@ -15,41 +15,55 @@ survey_schema = { "latitude_A": { "type": "number", "format": "float", - "description": ("Latitude of point A(intersection of normal)" - + "from waypoint A to survey line"), + "description": ( + "Latitude of point A(intersection of normal)" + + "from waypoint A to survey line" + ), "example": 178.2, }, "longitude_A": { "type": "number", "format": "float", - "description": ("Longitude of point A(intersection of normal)" - + "from waypoint A to survey line"), + "description": ( + "Longitude of point A(intersection of normal)" + + "from waypoint A to survey line" + ), "example": -10.122, }, "latitude_B": { "type": "number", "format": "float", - "description": ("Latitude of point B(intersection of normal)" - + "from waypoint B to survey line"), + "description": ( + "Latitude of point B(intersection of normal)" + + "from waypoint B to survey line" + ), "example": 178.2, }, "longitude_B": { "type": "number", "format": "float", - "description": ("Longitude of point B(intersection of normal)" - + "from waypoint B to survey line"), + "description": ( + "Longitude of point B(intersection of normal)" + + "from waypoint B to survey line" + ), "example": -10.122, }, "platform_ID": { "type": "string", "description": "Unique identifier for this platform", "example": "ecosub-2", - }, + }, "track_ID": { "type": "integer", "description": "Track number of action(s) currently executed by platform", "example": 1, }, }, - "required": ["latitude_A", "longitude_A", "latitude_B", "longitude_B", "platform_ID"], + "required": [ + "latitude_A", + "longitude_A", + "latitude_B", + "longitude_B", + "platform_ID", + ], } diff --git a/formats/survey_encoded.py b/formats/survey_encoded.py index 88081e3285deb4266389e017f8aba98706359816..218c8cfc1818ebf07d430d91df1b50ee4eaeb8ce 100644 --- a/formats/survey_encoded.py +++ b/formats/survey_encoded.py @@ -7,9 +7,5 @@ from copy import deepcopy survey_encoded_schema = deepcopy(encoded_schema) -survey_encoded_schema["properties"]["message_type"]["enum"] = [ - "survey_encoded" -] -survey_encoded_schema["properties"]["message_type"][ - "example" -] = "survey_encoded" +survey_encoded_schema["properties"]["message_type"]["enum"] = ["survey_encoded"] +survey_encoded_schema["properties"]["message_type"]["example"] = "survey_encoded" diff --git a/generate_schema_config.py b/generate_schema_config.py index 2204b14be0271a35b483afecc0c699cd5163dba2..bc08138c4b8109a405372fc68581905e33576b0d 100644 --- a/generate_schema_config.py +++ b/generate_schema_config.py @@ -68,8 +68,7 @@ swagger_config = { + "platform_status_encoded", "acknowledgement": "#/components/schemas/acknowledgement", "survey": "#/components/schemas/survey", - "survey_encoded": "#/components/schemas/" - + "survey_encoded", + "survey_encoded": "#/components/schemas/" + "survey_encoded", }, }, "oneOf": [