Officialv5.0.3MITkubb >=5.0.0node >=22

@kubb/plugin-ts

Generates TypeScript types and interfaces from your OpenAPI spec, the typed foundation the other Kubb plugins build on.

typescripttypesinterfacescodegenopenapi
Stijn Van Hulle

Stijn Van Hulle

@stijnvanhulle

Downloads
1.1M/ mo
Stars
8
Bundle size
593.4 kB
Updated
1d ago

@kubb/plugin-ts generates TypeScript types and interfaces from OpenAPI schemas. Other plugins use these types for requests, responses, hooks, and mocks.

Installation

bun add -d @kubb/plugin-ts

Dependencies

No plugin dependencies.

Example

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

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

Documentation

See also