flask-restful-swagger
flask-restful-swagger copied to clipboard
Blueprint url prefix bug
I noticed that the swagger endpoints do not work properly when the Api prefix is set instead of the Blueprint's url_prefix.
e.g.
# This does not work even though the routes are available
api = swagger.docs(Api(hw, prefix='/api/v1'), apiVersion='1.0', api_spec_url='/spec')
api.add_resource(HelloWorld, '/hello')
app.register_blueprint(hw)
# This does work
api = swagger.docs(Api(hw), apiVersion='1.0', api_spec_url='/spec')
api.add_resource(HelloWorld, '/hello')
app.register_blueprint(hw, url_prefix='/api/v1')