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-message-format
Commits
4c0a0aba
Commit
4c0a0aba
authored
2 years ago
by
Trishna Saeharaseelan
Browse files
Options
Download
Email Patches
Plain Diff
refactor: temp revert to components/schemas
parent
bc7486ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
35 deletions
+31
-35
formats/__init__.py
formats/__init__.py
+1
-1
generate_swagger.py
generate_swagger.py
+30
-34
No files found.
formats/__init__.py
View file @
4c0a0aba
...
...
@@ -8,7 +8,7 @@ __all__ = [
]
abstract_schema
=
{
"allOf"
:
[{
"$ref"
:
"#/
definition
s/Metadata"
}],
"allOf"
:
[{
"$ref"
:
"#/
components/schema
s/Metadata"
}],
"type"
:
"object"
,
"properties"
:
{
"payload"
:
{}
...
...
This diff is collapsed.
Click to expand it.
generate_swagger.py
View file @
4c0a0aba
...
...
@@ -28,15 +28,15 @@ swagger_config = {
"model_filter"
:
lambda
tag
:
True
,
}
],
#
"components": {
"
definition
s"
:
{
"Metadata"
:
message_metadata
,
"MissionPlan"
:
full_mission_plan_schema
,
"Observation"
:
full_observation_schema
,
"PlanningConfiguration"
:
full_planning_configuration_schema
,
"PlatformStatus"
:
full_platform_status_message_schema
,
"Acknowledgement"
:
full_acknowledgement_schema
,
#
}
"components"
:
{
"
schema
s"
:
{
"Metadata"
:
message_metadata
,
"MissionPlan"
:
full_mission_plan_schema
,
"Observation"
:
full_observation_schema
,
"PlanningConfiguration"
:
full_planning_configuration_schema
,
"PlatformStatus"
:
full_platform_status_message_schema
,
"Acknowledgement"
:
full_acknowledgement_schema
,
}
},
"paths"
:
{
"/all_messages"
:
{
...
...
@@ -49,30 +49,26 @@ swagger_config = {
"application/json"
:
{
"schema"
:
{
"oneOf"
:
[
full_mission_plan_schema
,
full_planning_configuration_schema
,
full_platform_status_message_schema
,
full_observation_schema
,
# {
# "$ref": "#/definitions/"
# + "Acknowledgement"
# },
# {
# "$ref": "#/definitions/"
# + "MissionPlan"
# },
# {
# "$ref": "#/definitions/"
# + "Observation"
# },
# {
# "$ref": "#/definitions/"
# + "PlanningConfiguration"
# },
# {
# "$ref": "#/definitions/"
# + "PlatformStatus"
# },
{
"$ref"
:
"#/components/schemas/"
+
"Acknowledgement"
},
{
"$ref"
:
"#/components/schemas/"
+
"MissionPlan"
},
{
"$ref"
:
"#/components/schemas/"
+
"Observation"
},
{
"$ref"
:
"#/components/schemas/"
+
"PlanningConfiguration"
},
{
"$ref"
:
"#/components/schemas/"
+
"PlatformStatus"
},
],
"discriminator"
:
{
"propertyName"
:
"message_type"
,
...
...
@@ -108,7 +104,7 @@ for item in message_types:
"schema"
:
{
"allOf"
:
[
{
"$ref"
:
"#/
definition
s/"
+
item
,
"$ref"
:
"#/
components/schema
s/"
+
item
,
},
],
"discriminator"
:
{
...
...
This diff is collapsed.
Click to expand it.
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