Skip to content

Commit

Permalink
Make FlaskApp instances honor Swagger UI configuration.
Browse files Browse the repository at this point in the history
Closes #161
  • Loading branch information
aholmes committed Nov 19, 2024
1 parent 80cbe7b commit 0cd68bf
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/web/Ligare/web/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import json_logging
from connexion import FlaskApp
from connexion.options import SwaggerUIOptions
from flask import Blueprint, Flask
from flask_injector import FlaskInjector
from injector import Module
Expand Down Expand Up @@ -509,8 +510,11 @@ def configure_openapi(config: Config, name: Optional[str] = None):
connexion_app = FlaskApp(
config.flask.app_name,
specification_dir=exec_dir,
# host=host,
# port=port,
swagger_ui_options=SwaggerUIOptions(
swagger_ui=config.flask.openapi.use_swagger,
swagger_ui_path=config.flask.openapi.swagger_url
or SwaggerUIOptions.swagger_ui_path,
),
)
app = connexion_app.app
config.update_flask_config(app.config)
Expand Down

0 comments on commit 0cd68bf

Please sign in to comment.