plugins: [pluginRedoc()]OpenAPI to Redoc documentation generator
@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.
- Downloads76.4K/ monthnpm, last 30 days
- GitHub stars12kubb-labs/plugins
- Unpacked size37.3kBv5.2.5 on npm
- Latest release4d agov5.2.5 · Nov 15, 2026
The Redoc plugin generates one Redoc HTML page with your OpenAPI spec embedded. Publish it to any static host without a build step.
Installation
kubb add plugin-redocbun add -d @kubb/plugin-redocpnpm add -D @kubb/plugin-redocnpm install --save-dev @kubb/plugin-redocyarn add -D @kubb/plugin-redockubb add installs the version the Kubb registry pins and adds pluginRedoc() to kubb.config.ts. It needs a kubb.config.ts, so run kubb init first in a new project.
Setup
No other plugins or packages are needed. The plugin needs the default OpenAPI adapter, adapterOas, and fails with KUBB_ADAPTER_REQUIRED for any other adapter.
Options worth knowing
| Option | Default | What it does |
|---|---|---|
output.path | 'docs.html' | Path of the HTML file, relative to the root output.path. End it with .html, because it names a file. |
The plugin has no other options.
Example
This config writes the page to src/gen/docs.html, titled with the spec's info.title.
import { defineConfig } from 'kubb/config'
import { pluginRedoc } from '@kubb/plugin-redoc'
export default defineConfig({
input: './petStore.yaml',
output: { path: './src/gen' },
plugins: [
pluginRedoc({ output: { path: 'docs.html' } }),
],
})src/
└── gen/
└── docs.htmlDependencies
No extension dependencies.
