flask-restful-swagger icon indicating copy to clipboard operation
flask-restful-swagger copied to clipboard

Blueprint url prefix bug

Open maarek opened this issue 11 years ago • 0 comments

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')

maarek avatar Oct 20 '14 02:10 maarek