Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Communications Backbone System
backbone-adapter-testsuite
Commits
17805398
Unverified
Commit
17805398
authored
2 years ago
by
Dan Jones
Browse files
Options
Download
Email Patches
Plain Diff
feat: features and fixtures from js adapter
parent
72413c71
Changes
21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
252 additions
and
0 deletions
+252
-0
fixtures/schema-swagger.json
fixtures/schema-swagger.json
+252
-0
No files found.
fixtures/schema-swagger.json
0 → 100644
View file @
17805398
{
"openapi"
:
"3.0.3"
,
"info"
:
{
"title"
:
"soar"
,
"version"
:
"1.0"
,
"description"
:
"SoAR message schemas"
},
"paths"
:
{},
"components"
:
{
"schemas"
:
{
"Message"
:
{
"properties"
:
{
"metadata"
:
{
"$ref"
:
"#/components/schemas/Metadata"
},
"payload"
:
{
"$ref"
:
"#/components/schemas/Payload"
}
},
"required"
:
[
"metadata"
,
"payload"
]
},
"Payload"
:
{
"discriminator"
:
{
"propertyName"
:
"message_type"
,
"mapping"
:
{
"VehicleStatus"
:
"#/components/schemas/VehicleStatus"
,
"VehicleMission"
:
"#/components/schemas/VehicleMission"
,
"AreaOfInterest"
:
"#/components/schemas/AreaOfInterest"
}
},
"oneOf"
:
[
{
"$ref"
:
"#/components/schemas/VehicleStatus"
},
{
"$ref"
:
"#/components/schemas/VehicleMission"
},
{
"$ref"
:
"#/components/schemas/AreaOfInterest"
}
]
},
"Metadata"
:
{
"properties"
:
{
"source"
:
{
"type"
:
"string"
,
"description"
:
"The sender."
,
"example"
:
"autonomy-engine"
},
"destination"
:
{
"type"
:
"string"
,
"description"
:
"Publisher topic."
,
"example"
:
"soar.noc.autosub.ah1.status"
},
"delivery_type"
:
{
"type"
:
"string"
,
"description"
:
"Published or broadcast"
,
"enum"
:
[
"broadcast"
,
"publish"
],
"example"
:
"2.0.0"
},
"message_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the type of message received."
,
"example"
:
"VehicleStatus"
}
},
"required"
:
[
"source"
,
"destination"
,
"message_id"
],
"type"
:
"object"
},
"Coordinates"
:
{
"properties"
:
{
"latitude"
:
{
"type"
:
"number"
,
"description"
:
"Latitude in decimal degrees."
,
"example"
:
54.234
},
"longitude"
:
{
"type"
:
"number"
,
"description"
:
"Longitude in decimal degrees."
,
"example"
:
-1.432
},
"depth"
:
{
"type"
:
"number"
,
"description"
:
"Target depth"
,
"default"
:
0
,
"example"
:
50
},
"altitude"
:
{
"type"
:
"number"
,
"description"
:
"Target altitude above bottom"
,
"default"
:
0
,
"example"
:
50
},
"projection"
:
{
"type"
:
"integer"
,
"description"
:
"EPSG Projection Code"
,
"example"
:
4326
,
"default"
:
4326
}
},
"required"
:
[
"latitude"
,
"longitude"
],
"type"
:
"object"
},
"VehicleStatus"
:
{
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"VehicleStatus"
,
"enum"
:
[
"VehicleStatus"
]
},
"operator_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the operator."
,
"example"
:
"noc"
},
"vehicle_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the vehicle."
,
"example"
:
"noc_ah1"
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
},
"battery_percentage"
:
{
"type"
:
"number"
,
"description"
:
"The remaining battery capacity."
,
"example"
:
64
}
},
"required"
:
[
"message_type"
,
"operator_id"
,
"vehicle_id"
,
"coordinates"
,
"battery_percentage"
],
"type"
:
"object"
},
"VehicleMission"
:
{
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"VehicleMission"
,
"enum"
:
[
"VehicleMission"
]
},
"operator_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the operator."
,
"example"
:
"noc"
},
"vehicle_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the vehicle."
,
"example"
:
"noc_ah1"
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
},
"actions"
:
{
"type"
:
"array"
,
"items"
:
{
"discriminator"
:
{
"propertyName"
:
"action_type"
,
"mapping"
:
{
"GoToWaypoint"
:
"#/components/schemas/GoToWaypoint"
,
"DescendToAltitude"
:
"#/components/schemas/DescendToAltitude"
,
"AscendToSurface"
:
"#/components/schemas/AscendToSurface"
}
},
"oneOf"
:
[
{
"$ref"
:
"#/components/schemas/VehicleStatus"
},
{
"$ref"
:
"#/components/schemas/VehicleMission"
},
{
"$ref"
:
"#/components/schemas/AreaOfInterest"
}
]
}
}
},
"required"
:
[
"message_type"
,
"operator_id"
,
"vehicle_id"
,
"coordinates"
,
"actions"
],
"type"
:
"object"
},
"AreaOfInterest"
:
{
"properties"
:
{
"message_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"AreaOfInterest"
,
"enum"
:
[
"AreaOfInterest"
]
},
"operator_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the operator."
,
"example"
:
"noc"
},
"vehicle_id"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the vehicle."
,
"example"
:
"noc_ah1"
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
}
},
"required"
:
[
"message_type"
,
"operator_id"
,
"vehicle_id"
,
"coordinates"
],
"type"
:
"object"
},
"GoToWaypoint"
:
{
"properties"
:
{
"action_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"GoToWaypoint"
,
"enum"
:
[
"GoToWaypoint"
]
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
}
},
"type"
:
"object"
},
"DescendToAltitude"
:
{
"properties"
:
{
"action_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"DescendToAltitude"
,
"enum"
:
[
"DescendToAltitude"
]
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
}
},
"type"
:
"object"
},
"AscendToSurface"
:
{
"properties"
:
{
"action_type"
:
{
"type"
:
"string"
,
"description"
:
"An identifier for the payload type."
,
"example"
:
"AscendToSurface"
,
"enum"
:
[
"AscendToSurface"
]
},
"coordinates"
:
{
"$ref"
:
"#/components/schemas/Coordinates"
}
},
"type"
:
"object"
}
}
}
}
This diff is collapsed.
Click to expand it.
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment