Skip to content

Commit 5391a82

Browse files
committed
Added base_path to connexion swagger
1 parent 4df5214 commit 5391a82

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pyms/flask/app/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ def create_app(self):
2828
return the app and the database objects.
2929
:return:
3030
"""
31+
config = get_conf(service=self.service)
3132
app = connexion.App(__name__, specification_dir=os.path.join(self.path, 'swagger'))
3233
app.add_api('swagger.yaml',
33-
arguments={'title': 'Swagger Example project'}
34+
arguments={'title': 'Swagger Example project'},
35+
base_path=config.APPLICATION_ROOT
3436
)
3537

3638
application = app.app

tests/tests_flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import unittest
33

44
from pyms.constants import CONFIGMAP_FILE_ENVIRONMENT
5-
from pyms.flask.app.utils import Microservice
5+
from pyms.flask.app import Microservice
66

77

88
def home():

0 commit comments

Comments
 (0)