🔗 Flask
Flasgger is a Flask extension to extract OpenAPI-Specification from all Flask views registered in your API.
Flasgger also comes with SwaggerUI embedded so you can access http://localhost:5000/apidocs and visualize and interact with your API resources.
Usage example: flask-restx-learn
Using Flasgger with external YAML files
- Install as described in docs.
- Init in the app:
- Define API specs in external YAML files, see example in flask-restx-learn. Place YAML file in the same directory with endpoint code.
- Add docstrings to endpoints:
- API docs are available at
http://127.0.0.1:5000/apidocs/
.
📂 Flask | Последнее изменение: 25.02.2024 14:36