My API documentation is getting quite large and I was wondering if it was possible to separate the openapi.yml
file into separately managed chunks rather than having it all in one and have reDoc (or some other tool) combine it and then generate the HTML site.
Asked
Active
Viewed 1,580 times
4

Archimedes Trajano
- 35,625
- 19
- 175
- 265
1 Answers
1
Redoc has its own tool for that "Redoc CLI" npm @redocly/cli
checkout their tutorial https://github.com/Redocly/openapi-starter
with this tool you can:
- split your actual docs with one command (to paths, components, parameters, schema)
redocly split openapi.yaml --outDir openapi
- lint them (separated files or final one)
redocly lint openapi/openapi.yaml
- preview (with hot reloading on change)
redocly preview-docs openapi/openapi.yaml
- and merge them back when production ready
redocly bundle openapi/openapi.yaml -o openapi.yaml
and even more...

Michal Miky Jankovský
- 3,089
- 1
- 35
- 36