Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/riddhi89/simple-flask-project

Generate OpenAPI spec from Flask routes
https://github.com/riddhi89/simple-flask-project

flask openapi3 python3

Last synced: 3 months ago
JSON representation

Generate OpenAPI spec from Flask routes

Awesome Lists containing this project

README

        

# simple-flask-project

Setup: create a python virtual environment and install the requirements:

virtualenv --python=python3.6 .venv
source .venv/bin/activate
pip install -r requirements.txt

Generate OpenAPI spec from Flask routes:

python generate_openapi_spec.py


View the OpenAPI spec using Swagger-UI:

docker run --rm -p 9000:8080 --name swagger-ui -e SWAGGER_JSON=/api_docs/openapi.json -v $(PWD)/api_docs:/api_docs swaggerapi/swagger-ui