- Downloads
- 284.1K/ mo
- Stars
- 1.8K
- Bundle size
- 569.6 kB
- Updated
- 1h ago
Read OpenAPI 2.0, 3.0, and 3.1 documents.
- Validate schemas and operations, then convert them into Kubb's AST.
- Configure
defineConfig.adapterto apply type mappings across plugins.
Kubb uses
adapterOas() by default. Add it explicitly to change options.Installation
Ships with kubb, no extra install.
Dependencies
No plugin dependencies.
Example
kubb.config.ts
import { defineConfig } from 'kubb/config'
import { adapterOas } from '@kubb/adapter-oas'
import { pluginTs } from '@kubb/plugin-ts'
export default defineConfig({
input: './petStore.yaml',
output: { path: './src/gen' },
adapter: adapterOas({ dateType: 'date', integerType: 'number' }),
plugins: [pluginTs()],
})