Skip to content

Changelog

3.0.1

3.0.0-beta.12

  • plugin-react-query: allow to disable the generation of useQuery or createQuery hooks.
  • plugin-svelte-query: allow to disable the generation of useQuery or createQuery hooks.
  • plugin-vue-query: allow to disable the generation of useQuery or createQuery hooks.
  • plugin-solid-query: allow to disable the generation of useQuery or createQuery hooks.
  • plugin-swr: allow to disable the generation of useQuery or createQuery hooks.

3.0.0-beta.11

  • plugin-ts: enumType 'enum' without export type in barrel files
  • plugin-client: Allows you to set a custom base url for all generated calls

3.0.0-beta.10

  • plugin-react-query: paramsType with options 'inline' and 'object' to have control over the amount of parameters when calling one of the generated functions.
  • plugin-svelte-query: paramsType with options 'inline' and 'object' to have control over the amount of parameters when calling one of the generated functions.
  • plugin-vue-query: paramsType with options 'inline' and 'object' to have control over the amount of parameters when calling one of the generated functions.
  • plugin-solid-query: paramsType with options 'inline' and 'object' to have control over the amount of parameters when calling one of the generated functions.
  • plugin-client: paramsType with options 'inline' and 'object' to have control over the amount of parameters when calling one of the generated functions.

3.0.0-beta.9

  • plugin-msw: parser option to disable faker generation
    • 'faker' will use @kubb/plugin-faker to generate the data for the response
    • 'data' will use your custom data to generate the data for the response
  • plugin-msw: Siblings for better AST manipulation

3.0.0-beta.8

3.0.0-beta.7

  • Upgrade external packages

3.0.0-beta.6

  • plugin-faker: Min/Max for type array to generate better faker.helpers.arrayElements functionality

3.0.0-beta.5

  • plugin-zod: Discard optional() if there is a default() to ensure the output type is not T | undefined

3.0.0-beta.4

  • Upgrade external packages

3.0.0-beta.3

  • plugin-zod: Added coercion for specific types only
typescript
type coercion=  boolean | { dates?: boolean; strings?: boolean; numbers?: boolean }

3.0.0-beta.2

  • Upgrade external packages

3.0.0-beta.1

  • Upgrade external packages

3.0.0-alpha.31

  • plugin-client: Generate ${tag}Service controller file related to group x when using group(no need to specify group.exportAs)
  • plugin-core: Removal of group.exportAs
  • plugin-core: Removal of group.output in favour of group.name(no need to specify the output/root)
kubb.config.ts
typescript
import { defineConfig } from "@kubb/core"
import { pluginOas } from "@kubb/plugin-oas"
import { pluginTs } from "@kubb/plugin-ts"
import { pluginClient } from '@kubb/plugin-client'

export default defineConfig({
  root: '.',
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    clean: true,
  },
  plugins: [
    pluginOas({ generators: [] }),
    pluginClient({
      output: {
        path: './clients/axios',
      },
      // group: { type: 'tag', output: './clients/axios/{{tag}}Service' },
      group: { type: 'tag', name: ({ group }) => `${group}Service` },
    }),
  ],
})

3.0.0-alpha.30

  • plugin-core: Removal of output.extName in favour of output.extension
  • plugin-core: Removal of exportType in favour of barrelType

3.0.0-alpha.29

3.0.0-alpha.28

3.0.0-alpha.27

  • plugin-swr: Support for TypeScript strict mode
  • plugin-react-query: Support for TypeScript strict mode and use of data object for mutationFn: async(data: {})
  • plugin-svelte-query: Support for TypeScript strict mode and use of data object for mutationFn: async(data: {})
  • plugin-vue-query: Support for TypeScript strict mode and use of data object for mutationFn: async(data: {})
  • plugin-solid-query: Support for TypeScript strict mode and use of data object for mutationFn: async(data: {})

3.0.0-alpha.26

  • plugin-swr: Expose queryKey and mutationKey for the SWR plugin
  • 'generators' option for all plugins

3.0.0-alpha.25

3.0.0-alpha.24

3.0.0-alpha.23

  • plugin-client: Use of uppercase for httpMethods, GET instead of get, POST instead of post, ...

3.0.0-alpha.22

  • plugin-faker: Use of faker.image.url() instead of faker.image.imageUrl()
  • plugin-zod: Enums should use z.literal when format is set to number, string or boolean
yaml
enum:
  type: boolean
  enum:
    - true
    - false
typescript
z.enum(["true", "false"]) 
z.union([z.literal(true), z.literal(false)]) 
  • plugin-ts: Use of readonly for references($ref)
  • plugin-client: Use of type Error when no errors are set for an operation

3.0.0-alpha.21

  • plugin-zod: Use of x-nullable and nullable for additionalProperties.

3.0.0-alpha.20

  • Separate plugin/package for Solid-Query: @kubb/plugin-solid-query
kubb.config.ts
typescript
import { defineConfig } from "@kubb/core"
import { pluginOas } from "@kubb/plugin-oas"
import { pluginTs } from "@kubb/plugin-ts"
import { pluginSolidQuery } from '@kubb/plugin-solid-query'
import { pluginTanstackQuery } from '@kubb/plugin-tanstack-query'

export default defineConfig({
  root: '.',
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    clean: true,
  },
  plugins: [
    pluginOas({ generators: [] }),
    pluginTs({
      output: {
        path: 'models',
      },
    }),
    pluginSolidQuery({
      output: {
        path: './hooks',
      },
    })
  ],
})
  • Separate plugin/package for Svelte-Query: @kubb/plugin-svelte-query
kubb.config.ts
typescript
import {defineConfig} from "@kubb/core"
import {pluginOas} from "@kubb/plugin-oas"
import {pluginTs} from "@kubb/plugin-ts"
import { pluginSvelteQuery } from '@kubb/plugin-svelte-query'
import { pluginTanstackQuery } from '@kubb/plugin-tanstack-query'

export default defineConfig({
  root: '.',
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    clean: true,
  },
  plugins: [
    pluginOas({ generators: [] }),
    pluginTs({
      output: {
        path: 'models',
      },
    }),
    pluginSvelteQuery({
      output: {
        path: './hooks',
      },
    })
  ],
})
  • Separate plugin/package for Vue-Query: @kubb/plugin-vue-query
kubb.config.ts
typescript
import {defineConfig} from "@kubb/core"
import {pluginOas} from "@kubb/plugin-oas"
import {pluginTs} from "@kubb/plugin-ts"
import { pluginVueQuery } from '@kubb/plugin-vue-query'
import { pluginTanstackQuery } from '@kubb/plugin-tanstack-query'

export default defineConfig({
  root: '.',
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    clean: true,
  },
  plugins: [
    pluginOas({ generators: [] }),
    pluginTs({
      output: {
        path: 'models',
      },
    }),
    pluginVueQuery({
      output: {
        path: './hooks',
      },
    })
  ],
})

3.0.0-alpha.16

  • Separate plugin/package for React-Query: @kubb/plugin-react-query
kubb.config.ts
typescript
import {defineConfig} from "@kubb/core"
import {pluginOas} from "@kubb/plugin-oas"
import {pluginTs} from "@kubb/plugin-ts"
import { pluginReactQuery } from '@kubb/plugin-react-query'
import { pluginTanstackQuery } from '@kubb/plugin-tanstack-query'

export default defineConfig({
  root: '.',
  input: {
    path: './petStore.yaml',
  },
  output: {
    path: './src/gen',
    clean: true,
  },
  plugins: [
    pluginOas({ generators: [] }),
    pluginTs({
      output: {
        path: 'models',
      },
    }),
    pluginReactQuery({
      output: {
        path: './hooks',
      },
    })
  ],
})

Released under the MIT License.