plugins: [pluginRedoc()]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.
- Downloads41.7K/ monthnpm, last 30 days
- GitHub stars8kubb-labs/plugins
- Unpacked size35.3kBv5.0.8 on npm
- Latest release9h agov5.0.8 · Oct 13, 2026
The Redoc plugin generates a single HTML page that documents your OpenAPI spec with Redoc.
The whole spec is embedded in the page, so you can publish the page to any static host without a build step. Viewing the page needs network access, because it loads a pinned Redoc bundle from jsDelivr, checked with a Subresource Integrity hash, and its fonts from Google Fonts.
Installation
bun add -d @kubb/plugin-redocpnpm add -D @kubb/plugin-redocnpm install --save-dev @kubb/plugin-redocyarn add -D @kubb/plugin-redocOr 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. The plugin reads the spec through the default OpenAPI adapter, adapterOas, and fails with any other adapter.
Options worth knowing
output.pathsets the HTML file path, relative to the rootoutput.path. The default isdocs.html. End it with.html, because it names a file, not a folder.
The plugin has no other options. See Options for its type and default.
Example
The config below writes the page to src/gen/docs.html.
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' } }),
],
})Dependencies
No extension dependencies.