Skip to content
Plugin
Redoc
plugins: [pluginRedoc()]
Officialv5.0.7kubb >=5.8.0node >=22

Redoc

@kubb/plugin-redoc

Generates a single-file HTML page from your OpenAPI spec with Redoc, rebuilt on every Kubb run so the docs match the spec your code comes from.

kubb add plugin-redoc
redocapi-docsdocumentationinteractive-docscodegenopenapi

Generates a single HTML page that documents your OpenAPI spec with Redoc. The page is rebuilt on every Kubb run, so the docs always match the spec your code comes from.

The spec is embedded in the page, so you can publish it to any static host without a build step. Viewing the page needs network access, because Redoc's scripts and fonts load from a CDN.

Installation

bun add -d @kubb/plugin-redoc

Or run kubb add plugin-redoc to install the version the Kubb registry pins and add pluginRedoc() to kubb.config.ts.

Setup

No other plugins or packages are needed.

Options worth knowing

  • output.path is the path of the HTML file. The default is docs.html. It points at a file, not a folder, so end it with .html.

The plugin takes no other options.

Dependencies

No extension dependencies.