Question

Is there a way to generate a RESTful API in Flask using Swagger?

Was it helpful?

Solution 2

Flask is now supported from the Swagger Editor: http://editor.swagger.io/#/

OTHER TIPS

There is Flask-RESTPlus based on Flask-Restful until now. It provides some decorators to document your API and generate a Swagger specification, a Postman collection...

Next version will be able to generate the API from Swagger specifications.

You can also use connexion

"Connexion is a framework on top of Flask to automagically handle your REST API requests based on Swagger 2.0 Specification files in YAML."

You can use flask-restful-swagger.

Flasgger is an extension to make automatic UI for Flask routes http://github.com/rochacbruno/flasgger

If you don't use the flask-restful extension you could take a look at flask-sillywalk

Nowadays there is also flask-apispec. It uses marshmallow to write the schemas/annotations that end up in the swagger output.

For Swagger 3.0:

Use fastapi.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top