flask-restx icon indicating copy to clipboard operation
flask-restx copied to clipboard

support for OpenAPI Version 3.0.3 - (Swagger)

Open nskley opened this issue 2 years ago • 2 comments

Question Are you willing to add support for open api spec version 3 guys ? flask-restx seems to support only swagger spec 2.0 (seen in code here: https://github.com/python-restx/flask-restx/blob/4c748d00eccef675afbde457d43bca5062715a5c/flask_restx/swagger.py#L295)

nskley avatar Jan 09 '23 12:01 nskley

@nskley It's something that has been talked about before. Unfortunately, it's not a small change due to how the schemas are generated, but it would be possible.

My question is, what is the use case / why do you want OpenAPI spec rather than Swagger 2.0? Are you serving the spec outside swagger-UI or do you need additional configuration not contained in Swagger 2.0?

In the meantime, if you need an equivalent OpenAPI spec from flask-restx you can convert it using: https://converter.swagger.io/

peter-doggart avatar Jan 18 '23 12:01 peter-doggart