redoc README

The project's README from github.com/Redocly/redoc. As one markdown file: README.md.

Redoc 3.0 is coming — one renderer for OpenAPI 3.2, AsyncAPI, GraphQL, and MCP

Learn what's coming in Redoc 3.x →

Generate beautiful API documentation from OpenAPI

npm License

bundle size npm jsDelivr status

About Redoc

Redoc is an open source tool for generating documentation from OpenAPI (formerly Swagger) definitions.

By default Redoc offers a three-panel, responsive layout:

Redoc demo

Live demo

If you want to see how Redoc renders your OpenAPI definition, you can try it out online at https://redocly.github.io/redoc/.

A version of the Swagger Petstore API is displayed by default. To test it with your own OpenAPI definition, enter the URL for your definition and select TRY IT.

Redoc features

Usage

Redoc is provided as a CLI tool (also distributed as a Docker image), HTML tag, and React component.

Generate documentation from the CLI

If you have Node installed, quickly generate documentation using npx:

npx @redocly/cli build-docs openapi.yaml

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

Create an HTML page, or edit an existing one, and add the following within the body tags:

    <redoc spec-url="http://petstore.swagger.io/v2/swagger.json"></redoc>
    <script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>

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.

Redoc vs hosted Redoc

Redoc is Redocly's community-edition product. Looking for something more? We also offer a hosted Redoc with additional features including:

Documentation and resources

Showcase

A sample of the organizations using Redocly tools in the wild:

Pull requests to add your own API page to the list are welcome

Configuration

Redoc is highly configurable, see the configuration documentation for details.

OpenAPI specification extensions

Redoc uses the following specification extensions:

Releases

The README for the 1.x version is on the v1.x branch.

All the 2.x releases are deployed to npm and can be used with Redocly-cdn:

Additionally, all the 1.x releases are hosted on our GitHub Pages-based CDN (deprecated):

Development

see CONTRIBUTING.md

redoc (Redocly/redoc)

Searching Database…

26K ·GitHub
What is this?Redoc is an open-source tool that generates API reference documentation from OpenAPI (formerly Swagger) definitions — it turns your spec file into a polished, readable reference page.
What does the generated documentation look like?A responsive three-panel web page: a search bar and navigation menu on the left, the documentation itself in the center, and request and response examples on the right.
How do I generate docs from my spec file?With Node installed, run the Redocly CLI via npx against your OpenAPI definition — it writes a redoc-static.html file you can open directly in your browser.
Do I need Node for this?The CLI route needs Node. If you'd rather not set that up, there's a Docker image, an HTML tag you can drop into any page, and a React component for app integration.
What am I missing by using this instead of Redocly's hosted product?Redoc is the community edition. The paid hosted version adds a try-it console, automated code samples, fully custom styles, a mock server, and AsyncAPI and GraphQL support.
Which API description formats does it accept?OpenAPI 3.1, OpenAPI 3.0, and legacy Swagger 2.0 definitions are all supported, so older Swagger specs work without conversion.
Can I preview my docs without installing anything?Yes — there's an online demo that renders a sample Petstore API by default; enter the URL of your own OpenAPI definition and select TRY IT to see how Redoc renders it.
Is the CLI only good for generating the HTML file?No — the Redocly CLI also does linting and bundling of your OpenAPI files, so docs generation can fold into a broader API workflow.
Who actually uses Redoc?The showcase lists organizations like Docker Engine, Zuora, Discourse, Rebilly, APIs.guru, and Quaderno API among users of Redocly tools.
Creator
Redocly
Size
104.5 MB
Stars
26K
Age
10y
Commits · 90 Days