Verified Commit 6e9d52e9 authored by Dan Jones's avatar Dan Jones
Browse files

Merge branch 'action-refactor-test' into 82-refactor-oneof-in-action-schema

3 merge requests!59Release v2.0.0,!51Resolve "Refactor oneOf in action schema",!36Resolve "Create temporary mas-dt branch for initial schema refactor"
Pipeline #233807 passed with stages
in 1 minute and 4 seconds
...@@ -110,22 +110,6 @@ mission_plan_schema = { ...@@ -110,22 +110,6 @@ mission_plan_schema = {
"example": "mission_plan", "example": "mission_plan",
"enum": ["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": { "platform_ID": {
"type": "string", "type": "string",
"description": "Unique identifier for this platform", "description": "Unique identifier for this platform",
...@@ -143,6 +127,29 @@ mission_plan_schema = { ...@@ -143,6 +127,29 @@ mission_plan_schema = {
"items": action_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": [ "required": [
"message_type", "message_type",
"autonomy_engine_plan_ID", "autonomy_engine_plan_ID",
......
...@@ -1528,21 +1528,28 @@ ...@@ -1528,21 +1528,28 @@
"type": "object" "type": "object"
}, },
"mission_plan": { "mission_plan": {
"properties": { "oneOf": [
"autonomy_engine_plan_ID": { {
"oneOf": [ "properties": {
{ "autonomy_engine_plan_ID": {
"description": "Unique identifier for this plangenerated by the Autonomy Engine", "description": "Unique identifier for this plangenerated by the Autonomy Engine",
"format": "uuid", "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" "type": "string"
}, }
{ }
},
{
"properties": {
"autonomy_engine_plan_ID": {
"description": "Unique identifier for this plangenerated by the Autonomy Engine", "description": "Unique identifier for this plangenerated by the Autonomy Engine",
"example": 3, "example": 3,
"type": "integer" "type": "integer"
} }
] }
}, }
],
"properties": {
"emergency": { "emergency": {
"default": false, "default": false,
"description": "To indicate if this is an emergency. true = emergency and false = no emergency", "description": "To indicate if this is an emergency. true = emergency and false = no emergency",
......
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