ashleysommer / sanic-restplus

Fully featured framework for fast, easy and documented API development with Sanic
http://flask-restplus.readthedocs.org
Other
104 stars 14 forks source link

Multiple swagger docs #22

Open notzippy opened 3 years ago

notzippy commented 3 years ago

Is it possible with the current release (0.5.5) to support multiple swagger endpoints? I tried to register an two Api instances and it failed on the second, with a sanic.router.RouteExists: Route already registered: /swaggerui<file_uri:/?.+> [HEAD,GET] I noticed on issue #6 you had mentioned using blueprints was disabled but that does appear that the only way you can enable multiple Api documents in the restplus plugin for flask. Is there another way?

thanks

ashleysommer commented 3 years ago

Hi @notzippy sorry for the delayed response, I didn't see this issue come through.

You're right, its not possible in Sanic-restplus to register more than one Api object right now, and I agree it should be possible.

There is a new extension called sanic-ext being developed by the sanic team that will be OpenAPI-3 compliant and will be much easier to use than this dodgy old restplus port. So Sanic-Restplus is essentially on maintenance mode now, until that comes out.