mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
The Release All Platforms bump job regenerates public/api/wekan.yml via openapi/generate_openapi.py and renders it with @redocly/cli, whose strict YAML parser rejects duplicate mapping keys. The 3-level nested SimpleSchema in models/attachmentStorageSettings.js (storageConfig.filesystem.enabled, storageConfig.gridfs.enabled, ...) exposed two generator bugs: - The sub-schema name was derived from only the first dotted path segment, collapsing filesystem.* and gridfs.* leaf keys (enabled/read/write) into a single mapping. - The linear emitter reopened the parent schema header once per interleaved nested object. Build sub-schema names from all leading path segments, and stable-sort dotted properties so each sub-schema's fields stay contiguous and its header is emitted once. Output is unchanged for existing 1- and 2-level schemas; @redocly/cli now renders the spec successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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 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 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