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
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
app
=
Flask
(
__name__
)
url_prefix
=
os
.
getenv
(
"URL_PREFIX"
,
""
)
swagger_config
=
{
"openapi"
:
"3.0.2"
,
...
...
@@ -28,6 +31,7 @@ swagger_config = {
"route"
:
"/soar_protocol.json"
,
}
],
"url_prefix"
:
url_prefix
,
"paths"
:
{},
"components"
:
{
"schemas"
:
{
...
...
@@ -78,7 +82,7 @@ swag = Swagger(app, config=swagger_config, merge=True)
flask_host
=
os
.
getenv
(
"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__"
:
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