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
d95aacfd
Commit
d95aacfd
authored
2 years ago
by
James Kirk
Browse files
Options
Download
Email Patches
Plain Diff
feat: adding url-prefix as field to swagger for nginx
parent
6cf9aedf
dev
41-add-optional-operating_area-as-a-wider-zone-outside-region_of_interest
42-add-event-details-and-status-to-acknowledgement-schema
66-tag-current-dev-as-version-1
76-should-depth-and-altitude-be-coordinates
80-add-informational-type-primitive
87-remove-comment-for-platform-status-state
87-remove-todo-comment-from-platform-state
action-refactor-test
ci-js-test
master
missionmonitor
v2.0.0
v2.0.0-beta.11
v2.0.0-beta.10
v2.0.0-beta.9
v2.0.0-beta.8
v2.0.0-beta.7
v2.0.0-beta.6
v2.0.0-beta.5
v2.0.0-beta.4
v2.0.0-beta.3
v2.0.0-beta.2
v2.0.0-beta.1
v1.0.0
v0.2.0
v0.1.0
2 merge requests
!16
Resolve "Release v0.1"
,
!7
feat: adding url-prefix as field to swagger for nginx
Pipeline
#108211
failed with stages
in 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
generate_schema_config.py
generate_schema_config.py
+5
-1
No files found.
generate_schema_config.py
View file @
d95aacfd
...
@@ -12,6 +12,9 @@ import os
...
@@ -12,6 +12,9 @@ import os
app
=
Flask
(
__name__
)
app
=
Flask
(
__name__
)
url_prefix
=
os
.
getenv
(
"URL_PREFIX"
,
""
)
swagger_config
=
{
swagger_config
=
{
"openapi"
:
"3.0.2"
,
"openapi"
:
"3.0.2"
,
...
@@ -28,6 +31,7 @@ swagger_config = {
...
@@ -28,6 +31,7 @@ swagger_config = {
"route"
:
"/soar_protocol.json"
,
"route"
:
"/soar_protocol.json"
,
}
}
],
],
"url_prefix"
:
url_prefix
,
"paths"
:
{},
"paths"
:
{},
"components"
:
{
"components"
:
{
"schemas"
:
{
"schemas"
:
{
...
@@ -78,7 +82,7 @@ swag = Swagger(app, config=swagger_config, merge=True)
...
@@ -78,7 +82,7 @@ swag = Swagger(app, config=swagger_config, merge=True)
flask_host
=
os
.
getenv
(
flask_host
=
os
.
getenv
(
"FLASK_HOST"
,
"localhost"
"FLASK_HOST"
,
"localhost"
)
# Sets to whatever
MQ
_HOST is, or defaults to localhost
)
# Sets to whatever
FLASK
_HOST is, or defaults to localhost
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
app
.
run
(
debug
=
False
,
host
=
flask_host
)
app
.
run
(
debug
=
False
,
host
=
flask_host
)
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