With Redocly CLI, you can bundle your OpenAPI definition and API documentation (made with Redoc) into an HTML file and render it locally.
To install the @redocly/cli package, either:
The Redocly CLI build-docs command builds Redoc into an HTML file.
To build an HTML file using Redocly CLI:
- Enter the following command, replacing
apis/openapi.yamlwith your API description file's name and path:
redocly build-docs apis/openapi.yamlSee the build-docs documentation for more information on the different options and ways you can use the command.
Also, check out Redocly CLI commands, for more information on the different things you can do with Redocly CLI including linting, splitting, and bundling your API definition file.