Officialv5.0.3MITkubb >=5.0.0node >=22

@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.

redocapi-docsdocumentationinteractive-docscodegenopenapi
Stijn Van Hulle

Stijn Van Hulle

@stijnvanhulle

Downloads
38.4K/ mo
Stars
8
Bundle size
27.0 kB
Updated
17h ago

@kubb/plugin-redoc generates a single HTML documentation page with Redoc. The spec is embedded in the file. Publish it to a static host without a build step. Rendering requires network access for CDN scripts and fonts.

Installation

bun add -d @kubb/plugin-redoc

Dependencies

No plugin dependencies. Kubb uses the OpenAPI adapter by default. The generated page loads Redoc from a CDN, so no Redoc runtime package is required.

Example

kubb.config.ts
import { defineConfig } from 'kubb'
import { pluginRedoc } from '@kubb/plugin-redoc'

export default defineConfig({
  input: './petStore.yaml',
  output: { path: './src/gen' },
  plugins: [
    pluginRedoc({ output: { path: 'docs.html' } }),
  ],
})

Documentation

See also