flask-restx
flask-restx copied to clipboard
Open API V3 Support
flask_restplus
currently outputs the swagger.json in the old "Swagger 2.0" format. Are there any plans to also support the OpenAPI 3.x specification?
OpenAPI 3.x has better support for different authentication methods, including JWT token-based authentication.
This includes updating the 2 year old swagger-ui-dist
Any updates on this? :-) I don't mind Swagger 2.0 myself, but I'm getting requests for OpenAPI 3.x. I'd be happy to help if needed!
Could you at least write something about plans for OpenAPI 3 in the readme.md
?
Currently it does not even recognize the existence of the new major version of the format.
With no such information one could easily get a false impression that it is implemented, working fine and there is not much to talk about.
...It's not that 3.0 appeared yesterday.
I think this is a rather serious issue. This is what refrains me from using this library...
I'm being requested to move to OpenAPI 3 for a rather big project, do you have any roadmap?
I want to bring up some big points here --
- the logic for creating the Swagger docs are ingrained in the RestX classes. So it's a heavy lift with the current architecture to support both 2.0 and 3.0.
- We've had discussions of moving the modeling from the RestX specific classes to a more generalized framework: https://github.com/python-restx/flask-restx/issues/59
I completely understand the need to move to OpenAPI 3.0, but it's going to be a large lift. We welcome contributions from all over, and I'm working through some more of the backlog of open PRs and issues.
Just out of curiosity. Is there a python library that is able to convert swagger 2.0 to openapi 3.0? If there is such library, would it make sense that flask-restx have the option to use this to switch between 2.0 and 3.0? Maybe just do this as a short term solution until the more generalized framework is done.
I know some time ago I used some converter from swagger 2.0 to openapi 3.0. A few details were not converted correctly so I stopped doing that. But don't know if it is impossible to do this conversion perfectly or was the converter that had some bug or missing features. Anyway, just throwing out an idea in case it could be useful.