Commit 09deecde authored by Trishna Saeharaseelan's avatar Trishna Saeharaseelan
Browse files

fix(autonomy_engine_control): oneof field

3 merge requests!59Release v2.0.0,!57Add new Autonomy message type,!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #261982 failed with stages
in 1 minute and 20 seconds
...@@ -12,27 +12,6 @@ autonomy_engine_control_schema = { ...@@ -12,27 +12,6 @@ autonomy_engine_control_schema = {
"example": "autonomy", "example": "autonomy",
"enum": ["autonomy"], "enum": ["autonomy"],
}, },
"oneOf": [
{
"properties": {
"planning_config_ID": {
"type": "string",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"description": "Unique identifier (uuid) for this specification version generated",
},
},
},
{
"properties": {
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
},
},
},
],
"state": { "state": {
"type": "string", "type": "string",
"enum": ["start", "pause", "stop"], "enum": ["start", "pause", "stop"],
...@@ -40,5 +19,26 @@ autonomy_engine_control_schema = { ...@@ -40,5 +19,26 @@ autonomy_engine_control_schema = {
"example": "stop", "example": "stop",
}, },
}, },
"oneOf": [
{
"properties": {
"planning_config_ID": {
"type": "string",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"description": "Unique identifier (uuid) for this specification version generated",
},
},
},
{
"properties": {
"planning_config_ID": {
"type": "integer",
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
},
},
},
],
"required": ["message_type", "planning_config_ID"], "required": ["message_type", "planning_config_ID"],
} }
...@@ -67,7 +67,7 @@ def get_swagger_config(reload=False): ...@@ -67,7 +67,7 @@ def get_swagger_config(reload=False):
"MESSAGE": message_schema, "MESSAGE": message_schema,
"header": message_header, "header": message_header,
"payload": payload_schema, "payload": payload_schema,
"autonomy": autonomy_engine_control_schema, "autonomy_engine_control": autonomy_engine_control_schema,
"mission_plan": mission_plan_schema, "mission_plan": mission_plan_schema,
"mission_plan_encoded": mission_plan_encoded_schema, "mission_plan_encoded": mission_plan_encoded_schema,
"observation": observation_schema, "observation": observation_schema,
......
...@@ -111,7 +111,28 @@ ...@@ -111,7 +111,28 @@
], ],
"type": "object" "type": "object"
}, },
"autonomy": { "autonomy_engine_control": {
"oneOf": [
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"type": "string"
}
}
},
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
"type": "integer"
}
}
}
],
"properties": { "properties": {
"message_type": { "message_type": {
"description": "Type of message", "description": "Type of message",
...@@ -121,27 +142,6 @@ ...@@ -121,27 +142,6 @@
"example": "autonomy", "example": "autonomy",
"type": "string" "type": "string"
}, },
"oneOf": [
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"format": "uuid",
"pattern": "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",
"type": "string"
}
}
},
{
"properties": {
"planning_config_ID": {
"description": "Unique identifier (uuid) for this specification version generated",
"example": 2,
"type": "integer"
}
}
}
],
"state": { "state": {
"description": "Autonomy engine instruction to start or stop model", "description": "Autonomy engine instruction to start or stop model",
"enum": [ "enum": [
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment