From 0df6f5956fd6c4fb946fa0cc75569b31b7943858 Mon Sep 17 00:00:00 2001 From: Finn Christiansen Date: Wed, 27 Jan 2021 19:50:41 +0100 Subject: [PATCH] initiate Api within create_app function to prevent apispec.exceptions.DuplicateComponentNameError --- app/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 5f3251b..436b174 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -6,7 +6,6 @@ from flask_migrate import Migrate #from flask_jwt_extended import JWTManager -api = Api() db = SQLAlchemy() ma = Marshmallow() #jwt = JWTManager() @@ -23,6 +22,7 @@ def create_app(cfg='default'): from . import resources + api = Api() api.init_app(app) db.init_app(app) ma.init_app(app)