diff --git a/formats/mission_plan.py b/formats/mission_plan.py index 0f582080d4842ceb4d741e4ce3a26d4f3a8ceef9..fe46d1170f90a2155764a2c4c42ee745b56ca822 100644 --- a/formats/mission_plan.py +++ b/formats/mission_plan.py @@ -110,22 +110,6 @@ mission_plan_schema = { "example": "mission_plan", "enum": ["mission_plan"], }, - "autonomy_engine_plan_ID": { - "oneOf": [ - { - "type": "string", - "format": "uuid", - "description": "Unique identifier for this plan" - + "generated by the Autonomy Engine", - }, - { - "type": "integer", - "description": "Unique identifier for this plan" - + "generated by the Autonomy Engine", - "example": 3, - }, - ] - }, "platform_ID": { "type": "string", "description": "Unique identifier for this platform", @@ -143,6 +127,29 @@ mission_plan_schema = { "items": action_schema, }, }, + "oneOf": [ + { + "properties": { + "autonomy_engine_plan_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 for this plan" + + "generated by the Autonomy Engine", + }, + }, + }, + { + "properties": { + "autonomy_engine_plan_ID": { + "type": "integer", + "description": "Unique identifier for this plan" + + "generated by the Autonomy Engine", + "example": 3, + }, + }, + }, + ], "required": [ "message_type", "autonomy_engine_plan_ID", diff --git a/project/soar/swagger.json b/project/soar/swagger.json index 359440a3abb8f9b6d3d107fd56e8789f8cad066e..aa0b4449261bfb3e6dfc95c2cbc234251797b582 100644 --- a/project/soar/swagger.json +++ b/project/soar/swagger.json @@ -1528,21 +1528,28 @@ "type": "object" }, "mission_plan": { - "properties": { - "autonomy_engine_plan_ID": { - "oneOf": [ - { + "oneOf": [ + { + "properties": { + "autonomy_engine_plan_ID": { "description": "Unique identifier for this plangenerated by the Autonomy Engine", "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": { + "autonomy_engine_plan_ID": { "description": "Unique identifier for this plangenerated by the Autonomy Engine", "example": 3, "type": "integer" } - ] - }, + } + } + ], + "properties": { "emergency": { "default": false, "description": "To indicate if this is an emergency. true = emergency and false = no emergency",