flask-restful-swagger
flask-restful-swagger copied to clipboard
Issues with multiple end points with similar names
I have upgraded from 0.12 to 0.15 and am seeing some breakage. I have multiple endpoints with similar paths as such:
#fanfeed endpoints
api.add_resource(feeditems.GetFanFeed, '/api/feeditems/<string:showId>/<string:catname>/<string:modified>')
api.add_resource(feeditems.PostFeedItem, '/api/feeditems')
api.add_resource(feeditems.UpdateFeedItem, '/api/feeditems', '/api/feeditems/<string:uuid>')
api.add_resource(feeditems.DeleteFeedItem, '/api/feeditems/<string:showid>/<string:uuid>')
When processing the second add to the API I get the following exception:
ValueError: This endpoint (/api/feeditems/help) is already set to the class SwaggerResource.
Is there a simple way to resolve this? I moved to 0.15 from 0.12 due to come issued with using the "Try it out!" button with posts containing both a JSON request body and query parameters arising from swagger-ui itself.. Might 0.14 or 0.13 be a better option to avoid both issues?
I had a similar problem but it was a result of me calling add_resource more than once. Stepping through with pdb helped me to get it sorted out. I didn't dig through the change lists but it seems possible that only registering each endpoint one time was added recently
Hi, I have the same issue like soulscreme. Does anyone has an idea on how to fix the issue please? Thankks and regards
Hi, I have fixed this issue in https://github.com/rantav/flask-restful-swagger/pull/92 .