Open FiveMeter opened 1 year ago
新建一个文件context用于存储,用的时候再取出来
def create_app(settings):
app = Flask(__name__)
context['app'] = app
context['siwa'] = SiwaDoc(app, doc_url='/docs', openapi_url='/openapi.json', title="test", description="test")
from ..context import context
siwa = context.get('siwa')
@siwa.doc()
# 定义接口
AssertionError: A name collision occurred between blueprints <flask.blueprints.Blueprint object at 0x7f9ea0a14cc0> and <flask.blueprints.Blueprint object at 0x7f9ea0a149b0>. Both share the same name "siwadoc". Blueprints that are created on the fly need unique names.