mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00

Previously, boards.js contains a `?.` operator, which is not supported by esprima, therefore boards.js is skipped. This PR fixes the API generation for borads.js by removing `?.`. See https://github.com/jquery/esprima/issues/2112
27 lines
797 B
Markdown
27 lines
797 B
Markdown
|
|
# 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](https://github.com/Kronuz/esprima-python)
|
|
|
|
### calling the tool
|
|
|
|
python3 generate_openapi.py --release v7.92 > ../public/api/wekan.yml
|
|
|
|
## Generating docs
|
|
Now that we have the OpenAPI, it's easy enough to convert the YAML file into some nice Markdown with
|
|
[shins](https://github.com/Mermade/shins) and [api2html](https://github.com/tobilg/api2html),
|
|
or even [ReDoc](https://github.com/Rebilly/ReDoc):
|
|
|
|
api2html -c ../public/logo-header.png -o api.html ../public/wekan_api.yml
|
|
|
|
or
|
|
|
|
redoc-cli serve ../public/wekan_api.yml
|