Auto-generated mock data
Fill each handler with generated data by setting parser to 'faker'. This value comes from @kubb/plugin-faker, so add pluginFaker() to the plugins array alongside pluginTs().
typescript
import { defineConfig } from 'kubb/config'
import { pluginTs } from '@kubb/plugin-ts'
import { pluginFaker } from '@kubb/plugin-faker'
import { pluginMsw } from '@kubb/plugin-msw'
export default defineConfig({
input: './petStore.yaml',
output: { path: './src/gen', clean: true },
plugins: [
pluginTs(),
pluginFaker(),
pluginMsw({
parser: 'faker',
}),
],
})