diff --git a/app/core.py b/app/core.py index eaa411e..50034f8 100644 --- a/app/core.py +++ b/app/core.py @@ -12,6 +12,7 @@ app.config.from_pyfile('config.py', silent=True) db = SQLAlchemy(app) bcrypt = Bcrypt(app) swagger = Swagger(app, template_file='swagger/template.yaml') +swagger.template['info']['version'] = app.config['APP_VERSION'] CORS(app) celery = celery_configurator.make_celery(app) diff --git a/config.py b/config.py index fae5be1..f82150f 100644 --- a/config.py +++ b/config.py @@ -2,6 +2,7 @@ import os # App configuration DEBUG = os.environ['DEBUG'] +APP_VERSION = '0.2.0' # Define the application directory BASE_DIR = os.path.abspath(os.path.dirname(__file__)) @@ -39,7 +40,7 @@ MQTT_REFRESH_TIME = 1.0 # refresh time in seconds CELERY_BROKER_URL = os.environ['REDIS_URL'] CELERY_RESULT_BACKEND = os.environ['REDIS_URL'] -# Flassger config +# Flasgger config SWAGGER = { 'uiversion': 3 }