Skip to content

Migration: @kubb/plugin-cypress

Part of the v4 → v5 migration guide. For the full option reference, see @kubb/plugin-cypress.

The plugin options stay the same. resolver.resolveName replaces transformers.name.

Generated output

Two things change. HTTP method constants are now uppercase ('post' becomes 'POST'), and imports follow the new *Data / *Response naming.

Diff
diff
- import type { AddPetMutationRequest, AddPetMutationResponse } from '../../models/AddPet.ts'
- export function addPet(data: AddPetMutationRequest): Cypress.Chainable<AddPetMutationResponse> {
-   return cy.request<AddPetMutationResponse>({
-     method: 'post',
-     url: 'http://localhost:3000/pet',
+ import type { AddPetData, AddPetResponse } from '../../models.ts'
+ export function addPet(data: AddPetData): Cypress.Chainable<AddPetResponse> {
+   return cy.request<AddPetResponse>({
+     method: 'POST',
+     url: `http://localhost:3000/pet`,