- 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
pnpm add -D @kubb/plugin-redoc
npm install --save-dev @kubb/plugin-redoc
yarn 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' } }),
],
})