Multiple tools exist that allows you to decorate your server source code with annotations used to generate the OpenAPI description of your services. ApiFlask is one of them.
1. Install it with pip3 install apiflask
.
2. Copy the server code from Activity 15 to app.py
and edit it as below.
3. Run the command flask spec
. It generates a file openapi.yaml
.