mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 07:20:12 +01:00
The script was considering that the operation associated to a jsdoc was declared on the line just after the end of the jsdoc. Turns out that adding new lines makes the code clearer, but the python script was then ignoring some jsdocs. Change the behaviour to consider that the jsdoc associated with an operation is the last one declared after the end of the previous operation. Fixes #3169 |
||
|---|---|---|
| .. | ||
| generate_openapi.py | ||
| README.md | ||
OpenAPI tools and doc generation
Open API generation
This folder contains a script (generate_openapi.py) that extracts
the REST API of Wekan and exports it under the OpenAPI 2.0 specification
(Swagger 2.0).
dependencies
- python3
- esprima-python
calling the tool
python3 generate_openapi.py --release v1.65 > ../public/wekan_api.yml
Generating docs
Now that we have the OpenAPI, it's easy enough to convert the YAML file into some nice Markdown with shins and api2html, or even ReDoc:
api2html -c ../public/logo-header.png -o api.html ../public/wekan_api.yml
or
redoc-cli serve ../public/wekan_api.yml