Skip to content

Commit

Permalink
Switch to own maintained version of swagger-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbeSneyders committed Jan 7, 2023
1 parent 073f0d4 commit 8a865a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions connexion/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from typing import Optional # NOQA

try:
from swagger_ui_bundle import swagger_ui_2_path, swagger_ui_3_path
from py_swagger_ui import swagger_ui_path
except ImportError:
swagger_ui_2_path = swagger_ui_3_path = None
swagger_ui_path = None

from connexion.uri_parsing import AbstractURIParser

Expand All @@ -26,12 +26,11 @@ class ConnexionOptions:
def __init__(self, options=None, oas_version=(2,)):
self._options = {}
self.oas_version = oas_version
self.swagger_ui_local_path = swagger_ui_path
if self.oas_version >= (3, 0, 0):
self.openapi_spec_name = "/openapi.json"
self.swagger_ui_local_path = swagger_ui_3_path
else:
self.openapi_spec_name = "/swagger.json"
self.swagger_ui_local_path = swagger_ui_2_path

if options:
self._options.update(filter_values(options))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def read_version(package):
'python-multipart>=0.0.5',
]

swagger_ui_require = 'swagger-ui-bundle>=0.0.2,<0.1'
swagger_ui_require = 'py-swagger-ui>=1.1.0,<2'

flask_require = [
'flask[async]>=2.2,<3',
Expand Down

0 comments on commit 8a865a7

Please sign in to comment.