Headline features
- Modern layout with extensive customization options.
- Support for OpenAPI 3.1, 3.0 and older 2.0 and Swagger formats.
- Embed or build standalone HTML documentation.
- CLI tool for easy automation and local development.
Demo
Usage
Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component. Generate documentation from the CLI
Generate documentation from the CLI
If you have Node installed, quickly generate documentation using npx:The tool outputs by default to a file named
redoc-static.html that you can open in your browser.Redocly CLI does more than docs, check it out and add linting, bundling and more to your API workflow.
Add an HTML element to the page
Add an HTML element to the page
Create an HTML page, or edit an existing one, and add the following:Open the HTML file in your browser, and your API documentation is shown on the page.Add your own
spec-url to the <redoc> tag; this attribute can also be a local file. The JavaScript library can also be installed locally using npm and served from your own server, see the HTML deployment documentation for more details.More usage options
Check out the deployment documentation for more options, and detailed documentation for each.Configure Redoc
Redoc is highly configurable. Each deployment option accepts configuration in a way that’s appropriate to that platform, but the options are the same for each. For example:- Using Redocly CLI, configuration goes in the
redocly.yamlfile, or can be supplied as command line parameters, such as--theme.openapi.disableSearch. - Using HTML or React, configure by setting
optionin the tag.
redocly.yaml configuration file, showing a few common settings and tweaking some of the visual theme settings:
Redocly CLI detects a file named redocly.yaml in the same directory as you run the command and uses it. See the documentation with a command like this:
Next steps
New to OpenAPI?
Try the OpenAPI starter project for a great introduction.
Ready to build?
Go to the Redoc quickstart and get started with your existing OpenAPI file.
Learn more
Visit Redoc on GitHub to explore the project further.