From 0e6fc369ad7ddd997bf0e1cebe66c3aeb220b54e Mon Sep 17 00:00:00 2001 From: Lubos Date: Fri, 2 Jan 2026 05:07:38 +0800 Subject: [PATCH] fix: allow overwriting symbol nodes --- dev/openapi-ts.config.ts | 6 +- .../src/client/@angular/common.gen.ts | 2 + .../openapi-ts-angular/openapi-ts.config.ts | 5 +- .../openapi-ts-angular/src/client/index.ts | 160 +- .../openapi-ts-angular/src/client/sdk.gen.ts | 8 +- packages/codegen-core/src/files/file.ts | 4 +- packages/codegen-core/src/planner/planner.ts | 54 +- packages/codegen-core/src/project/project.ts | 2 +- packages/codegen-core/src/symbols/symbol.ts | 4 +- .../angular-query-experimental.gen.ts | 6 +- .../meta/@tanstack/react-query.gen.ts | 6 +- .../meta/@tanstack/solid-query.gen.ts | 6 +- .../meta/@tanstack/svelte-query.gen.ts | 6 +- .../@tanstack/meta/@tanstack/vue-query.gen.ts | 6 +- .../plugins/@tanstack/meta/index.ts | 2 +- .../plugins/@tanstack/meta/sdk.gen.ts | 4 +- .../2.0.x/body-response-text-plain/index.ts | 2 +- .../2.0.x/body-response-text-plain/sdk.gen.ts | 2 +- .../__snapshots__/2.0.x/form-data/index.ts | 2 +- .../__snapshots__/2.0.x/form-data/sdk.gen.ts | 2 +- .../default-class/@angular/common.gen.ts | 135 +- .../@angular/common/default-class/index.ts | 2 +- .../@angular/common/default-class/sdk.gen.ts | 6 +- .../plugins/@angular/common/default/index.ts | 2 +- .../@angular/common/default/sdk.gen.ts | 6 +- .../sdk-nested-classes-instance/sdk.gen.ts | 8 +- .../sdk-nested-classes/sdk.gen.ts | 8 +- .../plugins/@hey-api/sdk/default/index.ts | 2 +- .../plugins/@hey-api/sdk/default/sdk.gen.ts | 6 +- .../plugins/@hey-api/sdk/instance/sdk.gen.ts | 16 +- .../@hey-api/sdk/throwOnError/index.ts | 2 +- .../@hey-api/sdk/throwOnError/sdk.gen.ts | 6 +- .../transformers/type-format-valibot/index.ts | 2 +- .../type-format-valibot/sdk.gen.ts | 2 +- .../transformers/type-format-zod/index.ts | 2 +- .../transformers/type-format-zod/sdk.gen.ts | 2 +- .../colada/asClass/@pinia/colada.gen.ts | 14 +- .../plugins/@pinia/colada/asClass/sdk.gen.ts | 16 +- .../@pinia/colada/fetch/@pinia/colada.gen.ts | 8 +- .../plugins/@pinia/colada/fetch/index.ts | 2 +- .../plugins/@pinia/colada/fetch/sdk.gen.ts | 6 +- .../angular-query-experimental.gen.ts | 14 +- .../asClass/sdk.gen.ts | 16 +- .../angular-query-experimental.gen.ts | 8 +- .../angular-query-experimental/axios/index.ts | 2 +- .../axios/sdk.gen.ts | 6 +- .../angular-query-experimental.gen.ts | 8 +- .../angular-query-experimental/fetch/index.ts | 2 +- .../fetch/sdk.gen.ts | 6 +- .../angular-query-experimental.gen.ts | 6 +- .../name-builder/index.ts | 2 +- .../name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/react-query.gen.ts | 8 +- .../@tanstack/react-query/axios/index.ts | 2 +- .../@tanstack/react-query/axios/sdk.gen.ts | 6 +- .../fetch/@tanstack/react-query.gen.ts | 8 +- .../@tanstack/react-query/fetch/index.ts | 2 +- .../@tanstack/react-query/fetch/sdk.gen.ts | 6 +- .../name-builder/@tanstack/react-query.gen.ts | 6 +- .../react-query/name-builder/index.ts | 2 +- .../react-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/solid-query.gen.ts | 8 +- .../@tanstack/solid-query/axios/index.ts | 2 +- .../@tanstack/solid-query/axios/sdk.gen.ts | 6 +- .../fetch/@tanstack/solid-query.gen.ts | 8 +- .../@tanstack/solid-query/fetch/index.ts | 2 +- .../@tanstack/solid-query/fetch/sdk.gen.ts | 6 +- .../name-builder/@tanstack/solid-query.gen.ts | 6 +- .../solid-query/name-builder/index.ts | 2 +- .../solid-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/svelte-query.gen.ts | 8 +- .../@tanstack/svelte-query/axios/index.ts | 2 +- .../@tanstack/svelte-query/axios/sdk.gen.ts | 6 +- .../fetch/@tanstack/svelte-query.gen.ts | 8 +- .../@tanstack/svelte-query/fetch/index.ts | 2 +- .../@tanstack/svelte-query/fetch/sdk.gen.ts | 6 +- .../@tanstack/svelte-query.gen.ts | 6 +- .../svelte-query/name-builder/index.ts | 2 +- .../svelte-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/vue-query.gen.ts | 8 +- .../@tanstack/vue-query/axios/index.ts | 2 +- .../@tanstack/vue-query/axios/sdk.gen.ts | 6 +- .../fetch/@tanstack/vue-query.gen.ts | 8 +- .../@tanstack/vue-query/fetch/index.ts | 2 +- .../@tanstack/vue-query/fetch/sdk.gen.ts | 6 +- .../name-builder/@tanstack/vue-query.gen.ts | 6 +- .../@tanstack/vue-query/name-builder/index.ts | 2 +- .../vue-query/name-builder/sdk.gen.ts | 4 +- .../2.0.x/security-api-key/index.ts | 2 +- .../2.0.x/security-api-key/sdk.gen.ts | 2 +- .../2.0.x/security-basic/index.ts | 2 +- .../2.0.x/security-basic/sdk.gen.ts | 2 +- .../2.0.x/security-false/index.ts | 2 +- .../2.0.x/security-false/sdk.gen.ts | 2 +- .../2.0.x/security-oauth2/index.ts | 2 +- .../2.0.x/security-oauth2/sdk.gen.ts | 2 +- .../3.0.x/body-response-text-plain/index.ts | 2 +- .../3.0.x/body-response-text-plain/sdk.gen.ts | 2 +- .../3.0.x/content-types/index.ts | 2 +- .../3.0.x/content-types/sdk.gen.ts | 2 +- .../parameter-explode-false-axios/index.ts | 2 +- .../parameter-explode-false-axios/sdk.gen.ts | 2 +- .../3.0.x/parameter-explode-false/index.ts | 2 +- .../3.0.x/parameter-explode-false/sdk.gen.ts | 2 +- .../default-class/@angular/common.gen.ts | 221 +- .../@angular/common/default-class/index.ts | 2 +- .../@angular/common/default-class/sdk.gen.ts | 12 +- .../plugins/@angular/common/default/index.ts | 2 +- .../@angular/common/default/sdk.gen.ts | 12 +- .../sdk-nested-classes-instance/sdk.gen.ts | 8 +- .../sdk-nested-classes/sdk.gen.ts | 8 +- .../plugins/@hey-api/sdk/default/index.ts | 2 +- .../plugins/@hey-api/sdk/default/sdk.gen.ts | 12 +- .../plugins/@hey-api/sdk/instance/sdk.gen.ts | 16 +- .../@hey-api/sdk/throwOnError/index.ts | 2 +- .../@hey-api/sdk/throwOnError/sdk.gen.ts | 12 +- .../transformers/type-format-valibot/index.ts | 2 +- .../type-format-valibot/sdk.gen.ts | 2 +- .../transformers/type-format-zod/index.ts | 2 +- .../transformers/type-format-zod/sdk.gen.ts | 2 +- .../colada/asClass/@pinia/colada.gen.ts | 14 +- .../plugins/@pinia/colada/asClass/sdk.gen.ts | 16 +- .../@pinia/colada/fetch/@pinia/colada.gen.ts | 14 +- .../plugins/@pinia/colada/fetch/index.ts | 2 +- .../plugins/@pinia/colada/fetch/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 14 +- .../asClass/sdk.gen.ts | 16 +- .../angular-query-experimental.gen.ts | 14 +- .../angular-query-experimental/axios/index.ts | 2 +- .../axios/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 14 +- .../angular-query-experimental/fetch/index.ts | 2 +- .../fetch/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 6 +- .../name-builder/index.ts | 2 +- .../name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/axios/index.ts | 2 +- .../@tanstack/react-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/fetch/index.ts | 2 +- .../@tanstack/react-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/react-query.gen.ts | 6 +- .../react-query/name-builder/index.ts | 2 +- .../react-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/axios/index.ts | 2 +- .../@tanstack/solid-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/fetch/index.ts | 2 +- .../@tanstack/solid-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/solid-query.gen.ts | 6 +- .../solid-query/name-builder/index.ts | 2 +- .../solid-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/axios/index.ts | 2 +- .../@tanstack/svelte-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/fetch/index.ts | 2 +- .../@tanstack/svelte-query/fetch/sdk.gen.ts | 12 +- .../@tanstack/svelte-query.gen.ts | 6 +- .../svelte-query/name-builder/index.ts | 2 +- .../svelte-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/axios/index.ts | 2 +- .../@tanstack/vue-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/fetch/index.ts | 2 +- .../@tanstack/vue-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/vue-query.gen.ts | 6 +- .../@tanstack/vue-query/name-builder/index.ts | 2 +- .../vue-query/name-builder/sdk.gen.ts | 4 +- .../3.0.x/security-api-key/index.ts | 2 +- .../3.0.x/security-api-key/sdk.gen.ts | 4 +- .../3.0.x/security-false/index.ts | 2 +- .../3.0.x/security-false/sdk.gen.ts | 2 +- .../3.0.x/security-http-bearer/index.ts | 2 +- .../3.0.x/security-http-bearer/sdk.gen.ts | 2 +- .../3.0.x/security-oauth2/index.ts | 2 +- .../3.0.x/security-oauth2/sdk.gen.ts | 2 +- .../3.0.x/security-open-id-connect/index.ts | 2 +- .../3.0.x/security-open-id-connect/sdk.gen.ts | 2 +- .../3.1.x/body-response-text-plain/index.ts | 2 +- .../3.1.x/body-response-text-plain/sdk.gen.ts | 2 +- .../client-angular/clean-false/index.ts | 2 +- .../client-angular/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-angular/default/index.ts | 2 +- .../client-angular/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../client-axios/clean-false/index.ts | 2 +- .../client-axios/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-axios/default/index.ts | 2 +- .../@hey-api/client-axios/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../client-axios/sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../client-axios/sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../client-axios/tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../client-fetch/clean-false/index.ts | 2 +- .../client-fetch/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-fetch/default/index.ts | 2 +- .../@hey-api/client-fetch/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../client-fetch/sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../client-fetch/sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../client-fetch/tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../@hey-api/client-ky/clean-false/index.ts | 2 +- .../@hey-api/client-ky/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-ky/default/index.ts | 2 +- .../@hey-api/client-ky/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../client-ky/sdk-client-optional/index.ts | 2 +- .../client-ky/sdk-client-optional/sdk.gen.ts | 12 +- .../client-ky/sdk-client-required/index.ts | 2 +- .../client-ky/sdk-client-required/sdk.gen.ts | 12 +- .../client-ky/tsconfig-node16-sdk/index.ts | 2 +- .../client-ky/tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../client-ky/tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../@hey-api/client-next/clean-false/index.ts | 2 +- .../client-next/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-next/default/index.ts | 2 +- .../@hey-api/client-next/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../client-next/sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../client-next/sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../client-next/tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../@hey-api/client-nuxt/clean-false/index.ts | 2 +- .../client-nuxt/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-nuxt/default/index.ts | 2 +- .../@hey-api/client-nuxt/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../client-nuxt/sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../client-nuxt/sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../client-nuxt/tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../client-ofetch/clean-false/index.ts | 2 +- .../client-ofetch/clean-false/sdk.gen.ts | 12 +- .../@hey-api/client-ofetch/default/index.ts | 2 +- .../@hey-api/client-ofetch/default/sdk.gen.ts | 12 +- .../import-file-extension-ts/index.ts | 2 +- .../import-file-extension-ts/sdk.gen.ts | 12 +- .../sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../tsconfig-node16-sdk/index.ts | 2 +- .../tsconfig-node16-sdk/sdk.gen.ts | 12 +- .../tsconfig-nodenext-sdk/index.ts | 2 +- .../tsconfig-nodenext-sdk/sdk.gen.ts | 12 +- .../clients/client-custom/bundle/index.ts | 2 +- .../clients/client-custom/bundle/sdk.gen.ts | 12 +- .../clients/client-custom/default/index.ts | 2 +- .../clients/client-custom/default/sdk.gen.ts | 12 +- .../sdk-client-optional/index.ts | 2 +- .../sdk-client-optional/sdk.gen.ts | 12 +- .../sdk-client-required/index.ts | 2 +- .../sdk-client-required/sdk.gen.ts | 12 +- .../3.1.x/clients/my-client/bundle/index.ts | 2 +- .../3.1.x/clients/my-client/bundle/sdk.gen.ts | 12 +- .../3.1.x/clients/my-client/default/index.ts | 2 +- .../clients/my-client/default/sdk.gen.ts | 12 +- .../my-client/sdk-client-optional/index.ts | 2 +- .../my-client/sdk-client-optional/sdk.gen.ts | 12 +- .../my-client/sdk-client-required/index.ts | 2 +- .../my-client/sdk-client-required/sdk.gen.ts | 12 +- .../3.1.x/content-types/index.ts | 2 +- .../3.1.x/content-types/sdk.gen.ts | 2 +- .../test/__snapshots__/3.1.x/headers/index.ts | 2 +- .../__snapshots__/3.1.x/headers/sdk.gen.ts | 8 +- .../@tanstack/react-query.gen.ts | 8 +- .../3.1.x/pagination-ref/index.ts | 2 +- .../3.1.x/pagination-ref/sdk.gen.ts | 4 +- .../parameter-explode-false-axios/index.ts | 2 +- .../parameter-explode-false-axios/sdk.gen.ts | 2 +- .../3.1.x/parameter-explode-false/index.ts | 2 +- .../3.1.x/parameter-explode-false/sdk.gen.ts | 2 +- .../default-class/@angular/common.gen.ts | 223 +- .../@angular/common/default-class/index.ts | 2 +- .../@angular/common/default-class/sdk.gen.ts | 12 +- .../plugins/@angular/common/default/index.ts | 2 +- .../@angular/common/default/sdk.gen.ts | 12 +- .../sdk-nested-classes-instance/sdk.gen.ts | 8 +- .../sdk-nested-classes/sdk.gen.ts | 8 +- .../plugins/@hey-api/sdk/default/index.ts | 2 +- .../plugins/@hey-api/sdk/default/sdk.gen.ts | 12 +- .../plugins/@hey-api/sdk/instance/sdk.gen.ts | 16 +- .../@hey-api/sdk/throwOnError/index.ts | 2 +- .../@hey-api/sdk/throwOnError/sdk.gen.ts | 12 +- .../transformers/type-format-valibot/index.ts | 2 +- .../type-format-valibot/sdk.gen.ts | 2 +- .../transformers/type-format-zod/index.ts | 2 +- .../transformers/type-format-zod/sdk.gen.ts | 2 +- .../colada/asClass/@pinia/colada.gen.ts | 14 +- .../plugins/@pinia/colada/asClass/sdk.gen.ts | 16 +- .../@pinia/colada/fetch/@pinia/colada.gen.ts | 14 +- .../plugins/@pinia/colada/fetch/index.ts | 2 +- .../plugins/@pinia/colada/fetch/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 14 +- .../asClass/sdk.gen.ts | 16 +- .../angular-query-experimental.gen.ts | 14 +- .../angular-query-experimental/axios/index.ts | 2 +- .../axios/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 14 +- .../angular-query-experimental/fetch/index.ts | 2 +- .../fetch/sdk.gen.ts | 12 +- .../angular-query-experimental.gen.ts | 6 +- .../name-builder/index.ts | 2 +- .../name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/axios/index.ts | 2 +- .../@tanstack/react-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/react-query.gen.ts | 14 +- .../@tanstack/react-query/fetch/index.ts | 2 +- .../@tanstack/react-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/react-query.gen.ts | 6 +- .../react-query/name-builder/index.ts | 2 +- .../react-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/axios/index.ts | 2 +- .../@tanstack/solid-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/solid-query.gen.ts | 14 +- .../@tanstack/solid-query/fetch/index.ts | 2 +- .../@tanstack/solid-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/solid-query.gen.ts | 6 +- .../solid-query/name-builder/index.ts | 2 +- .../solid-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/axios/index.ts | 2 +- .../@tanstack/svelte-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/svelte-query.gen.ts | 14 +- .../@tanstack/svelte-query/fetch/index.ts | 2 +- .../@tanstack/svelte-query/fetch/sdk.gen.ts | 12 +- .../@tanstack/svelte-query.gen.ts | 6 +- .../svelte-query/name-builder/index.ts | 2 +- .../svelte-query/name-builder/sdk.gen.ts | 4 +- .../asClass/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/asClass/sdk.gen.ts | 16 +- .../axios/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/axios/index.ts | 2 +- .../@tanstack/vue-query/axios/sdk.gen.ts | 12 +- .../fetch/@tanstack/vue-query.gen.ts | 14 +- .../@tanstack/vue-query/fetch/index.ts | 2 +- .../@tanstack/vue-query/fetch/sdk.gen.ts | 12 +- .../name-builder/@tanstack/vue-query.gen.ts | 6 +- .../@tanstack/vue-query/name-builder/index.ts | 2 +- .../vue-query/name-builder/sdk.gen.ts | 4 +- .../3.1.x/security-api-key/index.ts | 2 +- .../3.1.x/security-api-key/sdk.gen.ts | 4 +- .../3.1.x/security-false/index.ts | 2 +- .../3.1.x/security-false/sdk.gen.ts | 2 +- .../3.1.x/security-http-bearer/index.ts | 2 +- .../3.1.x/security-http-bearer/sdk.gen.ts | 2 +- .../3.1.x/security-oauth2/index.ts | 2 +- .../3.1.x/security-oauth2/sdk.gen.ts | 2 +- .../3.1.x/security-open-id-connect/index.ts | 2 +- .../3.1.x/security-open-id-connect/sdk.gen.ts | 2 +- .../method-class-conflict/class/sdk.gen.ts | 1416 +++++------- .../method-class-conflict/flat/sdk.gen.ts | 212 +- .../method-class-conflict/instance/sdk.gen.ts | 1928 ++++++----------- .../src/openApi/shared/locations/operation.ts | 65 +- .../@angular/common/httpRequests/resolve.ts | 1 + .../@angular/common/httpRequests/types.d.ts | 4 - .../@angular/common/httpResources/resolve.ts | 1 + .../@angular/common/httpResources/types.d.ts | 4 - .../plugins/@angular/common/shared/node.ts | 10 +- .../@hey-api/sdk/operations/resolve.ts | 1 + .../@hey-api/sdk/operations/types.d.ts | 4 - packages/openapi-ts/src/ts-dsl/base.ts | 3 + packages/openapi-ts/src/ts-dsl/decl/class.ts | 1 - .../openapi-ts/src/ts-dsl/decl/decorator.ts | 4 - packages/openapi-ts/src/ts-dsl/decl/enum.ts | 1 - packages/openapi-ts/src/ts-dsl/decl/field.ts | 4 - packages/openapi-ts/src/ts-dsl/decl/func.ts | 1 - packages/openapi-ts/src/ts-dsl/decl/getter.ts | 4 - packages/openapi-ts/src/ts-dsl/decl/method.ts | 4 - packages/openapi-ts/src/ts-dsl/decl/setter.ts | 4 - packages/openapi-ts/src/ts-dsl/stmt/var.ts | 1 - packages/openapi-ts/src/ts-dsl/type/alias.ts | 1 - .../openapi-ts/src/utils/naming/naming.ts | 2 +- 434 files changed, 3074 insertions(+), 4160 deletions(-) diff --git a/dev/openapi-ts.config.ts b/dev/openapi-ts.config.ts index 7c8e9a8b6..f8b29dd37 100644 --- a/dev/openapi-ts.config.ts +++ b/dev/openapi-ts.config.ts @@ -116,7 +116,7 @@ export default defineConfig(() => { // }, // format: 'prettier', header: null, - importFileExtension: '.js', + // importFileExtension: '.js', // indexFile: false, // lint: 'eslint', // nameConflictResolver({ attempt, baseName }) { @@ -310,9 +310,9 @@ export default defineConfig(() => { // name: '{{name}}Yummy', // }, // methods: 'static', - // nesting: 'operationId', + // nesting: 'id', // segmentName: '{{name}}Seggy', - strategy: 'byTags', + strategy: 'flat', // strategy(operation) { // const locations = OperationStrategy.byTags({ // fallback: 'default', diff --git a/examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts b/examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts index 992353f06..a74d1c634 100644 --- a/examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts +++ b/examples/openapi-ts-angular-common/src/client/@angular/common.gen.ts @@ -443,6 +443,7 @@ export class PetServiceResources { } } +@Injectable({ providedIn: 'root' }) export class StoreServiceResources { /** * Returns pet inventories by status. @@ -501,6 +502,7 @@ export class StoreServiceResources { } } +@Injectable({ providedIn: 'root' }) export class UserServiceResources { /** * Create user. diff --git a/examples/openapi-ts-angular/openapi-ts.config.ts b/examples/openapi-ts-angular/openapi-ts.config.ts index 002860668..2deb31be4 100644 --- a/examples/openapi-ts-angular/openapi-ts.config.ts +++ b/examples/openapi-ts-angular/openapi-ts.config.ts @@ -12,8 +12,11 @@ export default defineConfig({ '@hey-api/client-angular', '@hey-api/schemas', { - asClass: true, name: '@hey-api/sdk', + operations: { + containerName: '{{name}}Service', + strategy: 'byTags', + }, }, { enums: 'javascript', diff --git a/examples/openapi-ts-angular/src/client/index.ts b/examples/openapi-ts-angular/src/client/index.ts index b686cfff6..12450a715 100644 --- a/examples/openapi-ts-angular/src/client/index.ts +++ b/examples/openapi-ts-angular/src/client/index.ts @@ -1,85 +1,85 @@ // This file is auto-generated by @hey-api/openapi-ts -export { type Options, Store } from './sdk.gen'; -export { - type AddPetData, - type AddPetErrors, - type AddPetResponse, - type AddPetResponses, - type ApiResponse, - type Category, - type ClientOptions, - type CreateUserData, - type CreateUserErrors, - type CreateUserResponse, - type CreateUserResponses, - type CreateUsersWithListInputData, - type CreateUsersWithListInputErrors, - type CreateUsersWithListInputResponse, - type CreateUsersWithListInputResponses, - type DeleteOrderData, - type DeleteOrderErrors, - type DeleteOrderResponses, - type DeletePetData, - type DeletePetErrors, - type DeletePetResponses, - type DeleteUserData, - type DeleteUserErrors, - type DeleteUserResponses, - type FindPetsByStatusData, - type FindPetsByStatusErrors, - type FindPetsByStatusResponse, - type FindPetsByStatusResponses, - type FindPetsByTagsData, - type FindPetsByTagsErrors, - type FindPetsByTagsResponse, - type FindPetsByTagsResponses, - type GetInventoryData, - type GetInventoryErrors, - type GetInventoryResponse, - type GetInventoryResponses, - type GetOrderByIdData, - type GetOrderByIdErrors, - type GetOrderByIdResponse, - type GetOrderByIdResponses, - type GetPetByIdData, - type GetPetByIdErrors, - type GetPetByIdResponse, - type GetPetByIdResponses, - type GetUserByNameData, - type GetUserByNameErrors, - type GetUserByNameResponse, - type GetUserByNameResponses, - type LoginUserData, - type LoginUserErrors, - type LoginUserResponse, - type LoginUserResponses, - type LogoutUserData, - type LogoutUserErrors, - type LogoutUserResponses, - type Order, +export { type Options, PetService, StoreService, UserService } from './sdk.gen'; +export type { + AddPetData, + AddPetErrors, + AddPetResponse, + AddPetResponses, + ApiResponse, + Category, + ClientOptions, + CreateUserData, + CreateUserErrors, + CreateUserResponse, + CreateUserResponses, + CreateUsersWithListInputData, + CreateUsersWithListInputErrors, + CreateUsersWithListInputResponse, + CreateUsersWithListInputResponses, + DeleteOrderData, + DeleteOrderErrors, + DeleteOrderResponses, + DeletePetData, + DeletePetErrors, + DeletePetResponses, + DeleteUserData, + DeleteUserErrors, + DeleteUserResponses, + FindPetsByStatusData, + FindPetsByStatusErrors, + FindPetsByStatusResponse, + FindPetsByStatusResponses, + FindPetsByTagsData, + FindPetsByTagsErrors, + FindPetsByTagsResponse, + FindPetsByTagsResponses, + GetInventoryData, + GetInventoryErrors, + GetInventoryResponse, + GetInventoryResponses, + GetOrderByIdData, + GetOrderByIdErrors, + GetOrderByIdResponse, + GetOrderByIdResponses, + GetPetByIdData, + GetPetByIdErrors, + GetPetByIdResponse, + GetPetByIdResponses, + GetUserByNameData, + GetUserByNameErrors, + GetUserByNameResponse, + GetUserByNameResponses, + LoginUserData, + LoginUserErrors, + LoginUserResponse, + LoginUserResponses, + LogoutUserData, + LogoutUserErrors, + LogoutUserResponses, + Order, Pet, - type Pet2, - type PlaceOrderData, - type PlaceOrderErrors, - type PlaceOrderResponse, - type PlaceOrderResponses, - type Tag, - type UpdatePetData, - type UpdatePetErrors, - type UpdatePetResponse, - type UpdatePetResponses, - type UpdatePetWithFormData, - type UpdatePetWithFormErrors, - type UpdatePetWithFormResponse, - type UpdatePetWithFormResponses, - type UpdateUserData, - type UpdateUserErrors, - type UpdateUserResponses, - type UploadFileData, - type UploadFileErrors, - type UploadFileResponse, - type UploadFileResponses, + Pet2, + PlaceOrderData, + PlaceOrderErrors, + PlaceOrderResponse, + PlaceOrderResponses, + Tag, + UpdatePetData, + UpdatePetErrors, + UpdatePetResponse, + UpdatePetResponses, + UpdatePetWithFormData, + UpdatePetWithFormErrors, + UpdatePetWithFormResponse, + UpdatePetWithFormResponses, + UpdateUserData, + UpdateUserErrors, + UpdateUserResponses, + UploadFileData, + UploadFileErrors, + UploadFileResponse, + UploadFileResponses, User, - type UserArray, + UserArray, } from './types.gen'; diff --git a/examples/openapi-ts-angular/src/client/sdk.gen.ts b/examples/openapi-ts-angular/src/client/sdk.gen.ts index 104a85812..d7d470137 100644 --- a/examples/openapi-ts-angular/src/client/sdk.gen.ts +++ b/examples/openapi-ts-angular/src/client/sdk.gen.ts @@ -82,7 +82,7 @@ export type Options< }; @Injectable({ providedIn: 'root' }) -export class Pet { +export class PetService { /** * Add a new pet to the store. * @@ -252,7 +252,8 @@ export class Pet { } } -export class Store { +@Injectable({ providedIn: 'root' }) +export class StoreService { /** * Returns pet inventories by status. * @@ -325,7 +326,8 @@ export class Store { } } -export class User { +@Injectable({ providedIn: 'root' }) +export class UserService { /** * Create user. * diff --git a/packages/codegen-core/src/files/file.ts b/packages/codegen-core/src/files/file.ts index 78e09e41c..47a31f425 100644 --- a/packages/codegen-core/src/files/file.ts +++ b/packages/codegen-core/src/files/file.ts @@ -81,6 +81,7 @@ export class File { * Read-only accessor for the file extension. */ get extension(): string | undefined { + if (this.external) return; if (this._extension) return this._extension; const language = this.language; const extension = language ? this.project.extensions[language] : undefined; @@ -99,8 +100,7 @@ export class File { const dirs = this._logicalFilePath ? this._logicalFilePath.split('/').slice(0, -1) : []; - const extension = this.external ? '' : (this.extension ?? ''); - return [...dirs, `${this.name}${extension}`].join('/'); + return [...dirs, `${this.name}${this.extension ?? ''}`].join('/'); } /** diff --git a/packages/codegen-core/src/planner/planner.ts b/packages/codegen-core/src/planner/planner.ts index c2fa0b314..a5ee20320 100644 --- a/packages/codegen-core/src/planner/planner.ts +++ b/packages/codegen-core/src/planner/planner.ts @@ -3,7 +3,7 @@ import path from 'node:path'; import type { ExportModule, ImportModule } from '../bindings'; import type { IProjectRenderMeta } from '../extensions'; import type { File } from '../files/file'; -import type { IFileIn } from '../files/types'; +import type { INode } from '../nodes/node'; import { canShareName } from '../project/namespace'; import type { IProject } from '../project/types'; import { fromRef } from '../refs/refs'; @@ -48,7 +48,12 @@ export class Planner { const symbol = node.symbol; if (!symbol) return; - const file = this.project.files.register(this.symbolToFileIn(symbol)); + const file = this.project.files.register({ + external: false, + language: node.language, + logicalFilePath: + symbol.getFilePath?.(symbol) || this.project.defaultFileName, + }); file.addNode(node); symbol.setFile(file); for (const exportFrom of symbol.exportFrom) { @@ -61,7 +66,11 @@ export class Planner { ctx.walkScopes((dependency) => { const dep = fromRef(dependency); if (dep.external && dep.isCanonical && !dep.file) { - const file = this.project.files.register(this.symbolToFileIn(dep)); + const file = this.project.files.register({ + external: true, + language: dep.node?.language, + logicalFilePath: dep.external, + }); dep.setFile(file); } }); @@ -77,7 +86,7 @@ export class Planner { this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => { const symbol = node.symbol; if (!symbol) return; - this.assignTopLevelName({ ctx, symbol }); + this.assignTopLevelName({ ctx, node, symbol }); }); this.analyzer.analyze(this.project.nodes.all(), (ctx, node) => { @@ -87,6 +96,7 @@ export class Planner { const dep = fromRef(dependency); // top-level or external symbol if (dep.file) return; + // TODO: pass node this.assignLocalName({ ctx, file, @@ -106,7 +116,10 @@ export class Planner { */ private resolveFilePaths(meta?: IProjectRenderMeta): void { for (const file of this.project.files.registered()) { - if (file.external) continue; + if (file.external) { + file.setFinalPath(file.logicalFilePath); + continue; + } const finalName = this.project.fileName?.(file.name) || file.name; file.setName(finalName); const finalPath = file.finalPath; @@ -166,6 +179,7 @@ export class Planner { }); exp.setFile(target); sourceFile.set(exp.id, file); + // TODO: pass node this.assignTopLevelName({ ctx, symbol: exp }); let entry = fileMap.get(exp.finalName); @@ -253,6 +267,7 @@ export class Planner { if (!dep.file || dep.file.id === file.id) return; if (dep.external) { + // TODO: pass node this.assignTopLevelName({ ctx, symbol: dep }); } @@ -272,6 +287,7 @@ export class Planner { name: dep.finalName, }); imp.setFile(file); + // TODO: pass node this.assignTopLevelName({ ctx, scope: createScope({ localNames: imp.file!.allNames }), @@ -342,6 +358,7 @@ export class Planner { private assignTopLevelName( args: Partial & { ctx: AnalysisContext; + node?: INode; symbol: Symbol; }, ): void { @@ -373,6 +390,7 @@ export class Planner { ctx: AnalysisContext; /** The file the symbol belongs to. */ file: File; + node?: INode; symbol: Symbol; }, ): void { @@ -394,14 +412,18 @@ export class Planner { ctx: AnalysisContext; /** The file the symbol belongs to. */ file: File; + node?: INode; symbol: Symbol; }, ): void { - const { ctx, file, scope, scopesToUpdate, symbol } = args; + const { ctx, file, node, scope, scopesToUpdate, symbol } = args; if (this.cacheResolvedNames.has(symbol.id)) return; const baseName = symbol.name; - let finalName = symbol.node?.nameSanitizer?.(baseName) ?? baseName; + let finalName = + node?.nameSanitizer?.(baseName) ?? + symbol.node?.nameSanitizer?.(baseName) ?? + baseName; let attempt = 1; const localNames = ctx.localNames(scope); @@ -411,7 +433,7 @@ export class Planner { const ok = kinds.every((kind) => canShareName(symbol.kind, kind)); if (ok) break; - const language = symbol.node?.language || file.language; + const language = node?.language || symbol.node?.language || file.language; const resolver = (language ? this.project.nameConflictResolvers[language] : undefined) ?? this.project.defaultNameConflictResolver; @@ -420,7 +442,10 @@ export class Planner { throw new Error(`Unresolvable name conflict: ${symbol.toString()}`); } - finalName = symbol.node?.nameSanitizer?.(resolvedName) ?? resolvedName; + finalName = + node?.nameSanitizer?.(resolvedName) ?? + symbol.node?.nameSanitizer?.(resolvedName) ?? + resolvedName; attempt = attempt + 1; } @@ -443,15 +468,4 @@ export class Planner { cache.add(symbol.kind); scope.localNames.set(name, cache); } - - private symbolToFileIn(symbol: Symbol): IFileIn { - return { - external: Boolean(symbol.external), - language: symbol.node?.language, - logicalFilePath: - symbol.external || - symbol.getFilePath?.(symbol) || - this.project.defaultFileName, - } satisfies IFileIn; - } } diff --git a/packages/codegen-core/src/project/project.ts b/packages/codegen-core/src/project/project.ts index d31f5bb60..70f0722de 100644 --- a/packages/codegen-core/src/project/project.ts +++ b/packages/codegen-core/src/project/project.ts @@ -61,7 +61,7 @@ export class Project implements IProject { new Planner(this).plan(meta); const files: Array = []; for (const file of this.files.registered()) { - if (file.finalPath && file.renderer) { + if (!file.external && file.finalPath && file.renderer) { const content = file.renderer.render({ file, meta, project: this }); files.push({ content, path: file.finalPath }); } diff --git a/packages/codegen-core/src/symbols/symbol.ts b/packages/codegen-core/src/symbols/symbol.ts index ca6bc880f..70cbff3f7 100644 --- a/packages/codegen-core/src/symbols/symbol.ts +++ b/packages/codegen-core/src/symbols/symbol.ts @@ -299,7 +299,9 @@ export class Symbol { if (this._node && this._node !== node) { const message = `Symbol ${this.canonical.toString()} is already bound to a different node.`; log.debug(message, 'symbol'); - throw new Error(message); + // TODO: symbol <> node relationship needs to be refactor to 1:many + // disabled in the meantime or it would throw + // throw new Error(message); } this._node = node; node.symbol = this; diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts index 71c901e89..a168141eb 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions } from '@tanstack/angular-query-experimental'; import { client } from '../client.gen'; -import { barGet, fooGet, type Options } from '../sdk.gen'; +import { getBar, getFoo, type Options } from '../sdk.gen'; import type { GetBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -63,7 +63,7 @@ export const getBarQueryKey = (options?: Options) => createQueryKey( export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await barGet({ + const { data } = await getBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts index 9c6cc88e9..5a6a25034 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions } from '@tanstack/react-query'; import { client } from '../client.gen'; -import { barGet, fooGet, type Options } from '../sdk.gen'; +import { getBar, getFoo, type Options } from '../sdk.gen'; import type { GetBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -63,7 +63,7 @@ export const getBarQueryKey = (options?: Options) => createQueryKey( export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await barGet({ + const { data } = await getBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts index 7723aa46c..8b6d32356 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions } from '@tanstack/solid-query'; import { client } from '../client.gen'; -import { barGet, fooGet, type Options } from '../sdk.gen'; +import { getBar, getFoo, type Options } from '../sdk.gen'; import type { GetBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -63,7 +63,7 @@ export const getBarQueryKey = (options?: Options) => createQueryKey( export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await barGet({ + const { data } = await getBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts index 7f2a74fbe..4c50bd620 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions } from '@tanstack/svelte-query'; import { client } from '../client.gen'; -import { barGet, fooGet, type Options } from '../sdk.gen'; +import { getBar, getFoo, type Options } from '../sdk.gen'; import type { GetBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -63,7 +63,7 @@ export const getBarQueryKey = (options?: Options) => createQueryKey( export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await barGet({ + const { data } = await getBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts index 9ebea5291..4793f41da 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions } from '@tanstack/vue-query'; import { client } from '../client.gen'; -import { barGet, fooGet, type Options } from '../sdk.gen'; +import { getBar, getFoo, type Options } from '../sdk.gen'; import type { GetBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -63,7 +63,7 @@ export const getBarQueryKey = (options?: Options) => createQueryKey( export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await barGet({ + const { data } = await getBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/index.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/index.ts index 6fd0ae1e8..afbfb3822 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/index.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { barGet, fooGet, type Options } from './sdk.gen'; +export { getBar, getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetBarData, GetBarResponses, GetFooData, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/sdk.gen.ts b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/sdk.gen.ts index 059319152..e2081efc5 100644 --- a/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/sdk.gen.ts +++ b/packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ +export const getFoo = (options?: Options) => (options?.client ?? client).get({ security: [{ in: 'query', name: 'foo', @@ -28,7 +28,7 @@ export const fooGet = (options?: Options(options?: Options) => (options?.client ?? client).get({ +export const getBar = (options?: Options) => (options?.client ?? client).get({ security: [{ in: 'cookie', name: 'bar', diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/index.ts index cffa17616..de1daea43 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/sdk.gen.ts index aadd6a1be..275283fad 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooPost = (options: Options) => (options.client ?? client).post({ +export const postFoo = (options: Options) => (options.client ?? client).post({ bodySerializer: null, url: '/foo', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/index.ts index e4bb63d5f..8dc7240b1 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { type Options, v1FooPost } from './sdk.gen'; +export { type Options, postV1Foo } from './sdk.gen'; export type { ClientOptions, Foo, PostV1FooData, PostV1FooResponse, PostV1FooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/sdk.gen.ts index 0d29b6201..dc1a7f150 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const v1FooPost = (options: Options) => (options.client ?? client).post({ +export const postV1Foo = (options: Options) => (options.client ?? client).post({ ...formDataBodySerializer, url: '/v1/foo', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts index cfa3d8426..98bdbed01 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts @@ -7,66 +7,51 @@ import { client } from '../client.gen'; import type { Options } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; -export class No_tagRequests { - public static patch(options?: Options): HttpRequest { +@Injectable({ providedIn: 'root' }) +export class Default { + public static serviceWithEmptyTag(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', - method: 'PATCH', + method: 'GET', url: '/api/v{api-version}/no+tag', ...options }); } -} - -export class BodyRequests { - /** - * Body should not be unknown - * - * Body should not be unknown - */ - public static post(options: Options): HttpRequest { + + public static patchApiVbyApiVersionNoTag(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', - method: 'POST', - url: '/api/v{api-version}/body', + method: 'PATCH', + url: '/api/v{api-version}/no+tag', ...options }); } -} - -export class VApiVersionRequests { - static 'no+tagRequests' = No_tagRequests; - static bodyRequests = BodyRequests; -} - -export class ApiRequests { - static vApiVersionRequests = VApiVersionRequests; -} - -@Injectable({ providedIn: 'root' }) -export class Default { - public static serviceWithEmptyTag(options?: Options): HttpRequest { + public static fooWow(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', - method: 'GET', + method: 'PUT', url: '/api/v{api-version}/no+tag', ...options }); } - public static 'foo+Wow'(options?: Options): HttpRequest { + /** + * Body should not be unknown + * + * Body should not be unknown + */ + public static postApiVbyApiVersionBody(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', - method: 'PUT', - url: '/api/v{api-version}/no+tag', + method: 'POST', + url: '/api/v{api-version}/body', ...options }); } - - static apiRequests = ApiRequests; } +@Injectable({ providedIn: 'root' }) export class Simple { public static deleteCallWithoutParametersAndResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -132,6 +117,7 @@ export class Simple { } } +@Injectable({ providedIn: 'root' }) export class Descriptions { public static callWithDescriptions(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -143,6 +129,7 @@ export class Descriptions { } } +@Injectable({ providedIn: 'root' }) export class Parameters { public static callWithParameters(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -163,6 +150,7 @@ export class Parameters { } } +@Injectable({ providedIn: 'root' }) export class Defaults { public static callWithDefaultParameters(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -192,6 +180,7 @@ export class Defaults { } } +@Injectable({ providedIn: 'root' }) export class Duplicate { public static duplicateName(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -230,6 +219,7 @@ export class Duplicate { } } +@Injectable({ providedIn: 'root' }) export class NoContent { public static callWithNoContentResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -250,6 +240,7 @@ export class NoContent { } } +@Injectable({ providedIn: 'root' }) export class Response { public static callWithResponseAndNoContentResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -288,6 +279,7 @@ export class Response { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags1 { public static dummyA(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -308,6 +300,7 @@ export class MultipleTags1 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags2 { public static dummyA(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -328,6 +321,7 @@ export class MultipleTags2 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags3 { public static dummyB(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -339,6 +333,7 @@ export class MultipleTags3 { } } +@Injectable({ providedIn: 'root' }) export class CollectionFormat { public static collectionFormat(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -350,6 +345,7 @@ export class CollectionFormat { } } +@Injectable({ providedIn: 'root' }) export class Types { public static types(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -361,6 +357,7 @@ export class Types { } } +@Injectable({ providedIn: 'root' }) export class Complex { public static complexTypes(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -372,6 +369,7 @@ export class Complex { } } +@Injectable({ providedIn: 'root' }) export class Header { public static callWithResultFromHeader(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -383,6 +381,7 @@ export class Header { } } +@Injectable({ providedIn: 'root' }) export class Error_ { public static testErrorCode(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -394,6 +393,7 @@ export class Error_ { } } +@Injectable({ providedIn: 'root' }) export class NonAsciiÆøåÆøÅöôêÊ { public static nonAsciiæøåÆøÅöôêÊ字符串(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -405,57 +405,43 @@ export class NonAsciiÆøåÆøÅöôêÊ { } } -export class No_tagResources { - public static patch(options?: () => Options | undefined) { +@Injectable({ providedIn: 'root' }) +export class Default2 { + public static serviceWithEmptyTag(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default.apiRequests.vApiVersionRequests['no+tagRequests'].patch(opts) : undefined; + return opts ? Default.serviceWithEmptyTag(opts) : undefined; }); } -} - -export class BodyResources { - /** - * Body should not be unknown - * - * Body should not be unknown - */ - public static post(options: () => Options | undefined) { - return httpResource(() => { + + public static patchApiVbyApiVersionNoTag(options?: () => Options | undefined) { + return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default.apiRequests.vApiVersionRequests.bodyRequests.post(opts) : undefined; + return opts ? Default.patchApiVbyApiVersionNoTag(opts) : undefined; }); } -} - -export class VApiVersionResources { - static 'no+tagResources' = No_tagResources; - static bodyResources = BodyResources; -} - -export class ApiResources { - static vApiVersionResources = VApiVersionResources; -} - -export class Default2 { - public static serviceWithEmptyTag(options?: () => Options | undefined) { + public static fooWow(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default.serviceWithEmptyTag(opts) : undefined; + return opts ? Default.fooWow(opts) : undefined; }); } - public static 'foo+Wow'(options?: () => Options | undefined) { - return httpResource(() => { + /** + * Body should not be unknown + * + * Body should not be unknown + */ + public static postApiVbyApiVersionBody(options: () => Options | undefined) { + return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default['foo+Wow'](opts) : undefined; + return opts ? Default.postApiVbyApiVersionBody(opts) : undefined; }); } - - static apiResources = ApiResources; } +@Injectable({ providedIn: 'root' }) export class Simple2 { public static deleteCallWithoutParametersAndResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -507,6 +493,7 @@ export class Simple2 { } } +@Injectable({ providedIn: 'root' }) export class Descriptions2 { public static callWithDescriptions(options?: () => Options | undefined) { return httpResource(() => { @@ -516,6 +503,7 @@ export class Descriptions2 { } } +@Injectable({ providedIn: 'root' }) export class Parameters2 { public static callWithParameters(options: () => Options | undefined) { return httpResource(() => { @@ -532,6 +520,7 @@ export class Parameters2 { } } +@Injectable({ providedIn: 'root' }) export class Defaults2 { public static callWithDefaultParameters(options: () => Options | undefined) { return httpResource(() => { @@ -555,6 +544,7 @@ export class Defaults2 { } } +@Injectable({ providedIn: 'root' }) export class Duplicate2 { public static duplicateName(options?: () => Options | undefined) { return httpResource(() => { @@ -585,6 +575,7 @@ export class Duplicate2 { } } +@Injectable({ providedIn: 'root' }) export class NoContent2 { public static callWithNoContentResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -601,6 +592,7 @@ export class NoContent2 { } } +@Injectable({ providedIn: 'root' }) export class Response2 { public static callWithResponseAndNoContentResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -631,6 +623,7 @@ export class Response2 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags12 { public static dummyA(options?: () => Options | undefined) { return httpResource(() => { @@ -647,6 +640,7 @@ export class MultipleTags12 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags22 { public static dummyA(options?: () => Options | undefined) { return httpResource(() => { @@ -663,6 +657,7 @@ export class MultipleTags22 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags32 { public static dummyB(options?: () => Options | undefined) { return httpResource(() => { @@ -672,6 +667,7 @@ export class MultipleTags32 { } } +@Injectable({ providedIn: 'root' }) export class CollectionFormat2 { public static collectionFormat(options: () => Options | undefined) { return httpResource(() => { @@ -681,6 +677,7 @@ export class CollectionFormat2 { } } +@Injectable({ providedIn: 'root' }) export class Types2 { public static types(options: () => Options | undefined) { return httpResource(() => { @@ -690,6 +687,7 @@ export class Types2 { } } +@Injectable({ providedIn: 'root' }) export class Complex2 { public static complexTypes(options: () => Options | undefined) { return httpResource(() => { @@ -699,6 +697,7 @@ export class Complex2 { } } +@Injectable({ providedIn: 'root' }) export class Header2 { public static callWithResultFromHeader(options?: () => Options | undefined) { return httpResource(() => { @@ -708,6 +707,7 @@ export class Header2 { } } +@Injectable({ providedIn: 'root' }) export class Error2 { public static testErrorCode(options: () => Options | undefined) { return httpResource(() => { @@ -717,6 +717,7 @@ export class Error2 { } } +@Injectable({ providedIn: 'root' }) export class NonAsciiÆøåÆøÅöôêÊ2 { public static nonAsciiæøåÆøÅöôêÊ字符串(options: () => Options | undefined) { return httpResource(() => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts index a1beb0a63..fafb8ed66 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts @@ -54,10 +54,6 @@ export class Domains extends HeyApiClient { public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/business/providers/domains', ...options }); } - - public put(options?: Options) { - return (options?.client ?? this.client).put({ url: '/business/providers/domains', ...options }); - } } export class Providers extends HeyApiClient { @@ -89,6 +85,10 @@ export class NestedSdkWithInstance extends HeyApiClient { NestedSdkWithInstance.__registry.set(this, args?.key); } + public putBusinessProvidersDomains(options?: Options) { + return (options?.client ?? this.client).put({ url: '/business/providers/domains', ...options }); + } + public get(options?: Options) { return (options?.client ?? this.client).get({ url: '/locations', ...options }); } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts index 505a12a57..babd05bc9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts @@ -74,10 +74,6 @@ export class Domains3 { public static post(options?: Options) { return (options?.client ?? client).post({ url: '/business/providers/domains', ...options }); } - - public static put(options?: Options) { - return (options?.client ?? client).put({ url: '/business/providers/domains', ...options }); - } } export class Providers4 { @@ -89,6 +85,10 @@ export class Business4 { } export class Domains4 { + public static putBusinessProvidersDomains(options?: Options) { + return (options?.client ?? client).put({ url: '/business/providers/domains', ...options }); + } + static business = Business4; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts index 060d7ded1..af464f9b9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts @@ -47,10 +47,6 @@ class HeyApiRegistry { } export class Bar extends HeyApiClient { - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/foo/bar', ...options }); - } - public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/foo/bar', ...options }); } @@ -61,10 +57,6 @@ export class Bar extends HeyApiClient { } export class Foo extends HeyApiClient { - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/foo', ...options }); - } - public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/foo', ...options }); } @@ -90,6 +82,14 @@ export class Sdk extends HeyApiClient { Sdk.__registry.set(this, args?.key); } + public getFoo(options?: Options) { + return (options?.client ?? this.client).get({ url: '/foo', ...options }); + } + + public getFooBar(options?: Options) { + return (options?.client ?? this.client).get({ url: '/foo/bar', ...options }); + } + private _foo?: Foo; get foo(): Foo { return this._foo ??= new Foo({ client: this.client }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts index bca22f7cc..9cfe2097f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts index 61e4b126b..8dc6d0499 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts index 8d5af124b..b443e6ac2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts @@ -22,7 +22,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ requestValidator: async (data) => await v.parseAsync(vPostFooData, data), responseTransformer: postFooResponseTransformer, responseValidator: async (data) => await v.parseAsync(vPostFooResponse, data), diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts index 61e4b126b..8dc6d0499 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts index 56a6a3fd7..db455df67 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ requestValidator: async (data) => await zPostFooData.parseAsync(data), responseTransformer: postFooResponseTransformer, responseValidator: async (data) => await zPostFooResponse.parseAsync(data), diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts index 84f186999..84e2f19a3 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts @@ -4,7 +4,7 @@ import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@p import { serializeQueryKeyValue } from '../client'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -47,7 +47,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooQuery = defineQueryOptions((options?: Options) => ({ key: getFooQueryKey(options), query: async (context) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...context, throwOnError: true @@ -58,7 +58,7 @@ export const getFooQuery = defineQueryOptions((options?: Options) => export const fooPostMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...vars, throwOnError: true @@ -69,7 +69,7 @@ export const fooPostMutation = (options?: Partial>): UseMut export const fooPutMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...vars, throwOnError: true @@ -83,7 +83,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarQuery = defineQueryOptions((options?: Options) => ({ key: getFooBarQueryKey(options), query: async (context) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...context, throwOnError: true @@ -94,7 +94,7 @@ export const getFooBarQuery = defineQueryOptions((options?: Options>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...vars, throwOnError: true @@ -105,7 +105,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...vars, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts index 6d802c7a7..14aff2882 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts @@ -4,7 +4,7 @@ import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@p import { serializeQueryKeyValue } from '../client'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseData, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagQuery = defineQueryOptions((options?: Options>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...vars, throwOnError: true @@ -69,7 +69,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...vars, throwOnError: true @@ -426,7 +426,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< */ export const postApiVbyApiVersionBodyMutation = (options?: Partial>): UseMutationOptions, PostApiVbyApiVersionBodyError> => ({ mutation: async (vars) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...vars, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@pinia/colada/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 72bb39e1a..ac5127274 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...queryKey[0], signal, @@ -57,7 +57,7 @@ export const getFooOptions = (options?: Options) => queryOptions>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const fooPostMutation = (options?: Partial>): Mutati export const fooPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...fnOptions, throwOnError: true @@ -86,7 +86,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...queryKey[0], signal, @@ -100,7 +100,7 @@ export const getFooBarOptions = (options?: Options) => queryOptio export const fooBarPostMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...fnOptions, throwOnError: true @@ -114,7 +114,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts index b8871211a..cef8fd363 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts @@ -4,7 +4,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack import type { AxiosError } from 'axios'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -72,7 +72,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -494,7 +494,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts index fae730b98..9359ba9fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -155,7 +155,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ responseType: 'json', url: '/api/v{api-version}/body', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts index 36c7f22f5..5087360ef 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -57,7 +57,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -493,7 +493,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts index 1f27d6e82..b144ed7a2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/angular-query-experimental'; import { client } from '../client.gen'; -import { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from '../sdk.gen'; +import { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooD = (options?: Options) => createQueryKey('getFoo export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -86,7 +86,7 @@ export const getFooBarD = (options?: Options) => createQueryKey(' export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooBarGet({ + const { data } = await getFooBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts index e42ffea2a..b3d19ebcd 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from './sdk.gen'; +export { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen'; export type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts index a52716c48..a70249590 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/name-builder/sdk.gen.ts @@ -18,13 +18,13 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); export const fooPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo', ...options }); export const fooPut = (options?: Options) => (options?.client ?? client).put({ url: '/foo', ...options }); -export const fooBarGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); +export const getFooBar = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); export const fooBarPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo/bar', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index 8971e2a33..486657ead 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...queryKey[0], signal, @@ -57,7 +57,7 @@ export const getFooOptions = (options?: Options) => queryOptions>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const fooPostMutation = (options?: Partial>): UseMut export const fooPutMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...fnOptions, throwOnError: true @@ -86,7 +86,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...queryKey[0], signal, @@ -100,7 +100,7 @@ export const getFooBarOptions = (options?: Options) => queryOptio export const fooBarPostMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...fnOptions, throwOnError: true @@ -114,7 +114,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts index 0749df981..da398d170 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts @@ -4,7 +4,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanst import type { AxiosError } from 'axios'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -72,7 +72,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -494,7 +494,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts index fae730b98..9359ba9fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -155,7 +155,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ responseType: 'json', url: '/api/v{api-version}/body', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts index 946c6f502..ef023fe2c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -57,7 +57,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -493,7 +493,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts index f6cb04a06..43c90277c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/react-query'; import { client } from '../client.gen'; -import { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from '../sdk.gen'; +import { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooD = (options?: Options) => createQueryKey('getFoo export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -86,7 +86,7 @@ export const getFooBarD = (options?: Options) => createQueryKey(' export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooBarGet({ + const { data } = await getFooBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/index.ts index e42ffea2a..b3d19ebcd 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from './sdk.gen'; +export { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen'; export type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts index a52716c48..a70249590 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/name-builder/sdk.gen.ts @@ -18,13 +18,13 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); export const fooPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo', ...options }); export const fooPut = (options?: Options) => (options?.client ?? client).put({ url: '/foo', ...options }); -export const fooBarGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); +export const getFooBar = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); export const fooBarPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo/bar', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts index 94993b462..d5594064c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...queryKey[0], signal, @@ -57,7 +57,7 @@ export const getFooOptions = (options?: Options) => queryOptions>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const fooPostMutation = (options?: Partial>): Mutati export const fooPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...fnOptions, throwOnError: true @@ -86,7 +86,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...queryKey[0], signal, @@ -100,7 +100,7 @@ export const getFooBarOptions = (options?: Options) => queryOptio export const fooBarPostMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...fnOptions, throwOnError: true @@ -114,7 +114,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts index 5d2514fea..7a51e436a 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts @@ -4,7 +4,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack import type { AxiosError } from 'axios'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -72,7 +72,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -494,7 +494,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts index fae730b98..9359ba9fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -155,7 +155,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ responseType: 'json', url: '/api/v{api-version}/body', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts index 14c5d1367..c4092a30b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -57,7 +57,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -493,7 +493,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts index f01de6af2..ba1febdda 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/solid-query'; import { client } from '../client.gen'; -import { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from '../sdk.gen'; +import { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooD = (options?: Options) => createQueryKey('getFoo export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -86,7 +86,7 @@ export const getFooBarD = (options?: Options) => createQueryKey(' export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooBarGet({ + const { data } = await getFooBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/index.ts index e42ffea2a..b3d19ebcd 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from './sdk.gen'; +export { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen'; export type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts index a52716c48..a70249590 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/name-builder/sdk.gen.ts @@ -18,13 +18,13 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); export const fooPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo', ...options }); export const fooPut = (options?: Options) => (options?.client ?? client).put({ url: '/foo', ...options }); -export const fooBarGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); +export const getFooBar = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); export const fooBarPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo/bar', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts index 00aec8126..3e2927597 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...queryKey[0], signal, @@ -57,7 +57,7 @@ export const getFooOptions = (options?: Options) => queryOptions>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const fooPostMutation = (options?: Partial>): Mutati export const fooPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...fnOptions, throwOnError: true @@ -86,7 +86,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...queryKey[0], signal, @@ -100,7 +100,7 @@ export const getFooBarOptions = (options?: Options) => queryOptio export const fooBarPostMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...fnOptions, throwOnError: true @@ -114,7 +114,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts index e2c388b63..8900d4a58 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts @@ -4,7 +4,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack import type { AxiosError } from 'axios'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -72,7 +72,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -494,7 +494,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions, Options> => { const mutationOptions: MutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts index fae730b98..9359ba9fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -155,7 +155,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ responseType: 'json', url: '/api/v{api-version}/body', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts index 8495eca14..e14c0d70c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -57,7 +57,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -493,7 +493,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): MutationOptions> => { const mutationOptions: MutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts index 1de44f6db..6a831b5b3 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, type MutationOptions, queryOptions } from '@tanstack/svelte-query'; import { client } from '../client.gen'; -import { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from '../sdk.gen'; +import { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooD = (options?: Options) => createQueryKey('getFoo export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -86,7 +86,7 @@ export const getFooBarD = (options?: Options) => createQueryKey(' export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooBarGet({ + const { data } = await getFooBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts index e42ffea2a..b3d19ebcd 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from './sdk.gen'; +export { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen'; export type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts index a52716c48..a70249590 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/name-builder/sdk.gen.ts @@ -18,13 +18,13 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); export const fooPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo', ...options }); export const fooPut = (options?: Options) => (options?.client ?? client).put({ url: '/foo', ...options }); -export const fooBarGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); +export const getFooBar = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); export const fooBarPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo/bar', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts index 1c0b7cb8c..2e82ca355 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...queryKey[0], signal, @@ -57,7 +57,7 @@ export const getFooOptions = (options?: Options) => queryOptions>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const fooPostMutation = (options?: Partial>): UseMut export const fooPutMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...fnOptions, throwOnError: true @@ -86,7 +86,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...queryKey[0], signal, @@ -100,7 +100,7 @@ export const getFooBarOptions = (options?: Options) => queryOptio export const fooBarPostMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...fnOptions, throwOnError: true @@ -114,7 +114,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts index 68a9133d8..5a5ce3b11 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts @@ -4,7 +4,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanst import type { AxiosError } from 'axios'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -72,7 +72,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -494,7 +494,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): UseMutationOptions, Options> => { const mutationOptions: UseMutationOptions, Options> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts index fae730b98..9359ba9fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/axios/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -155,7 +155,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ responseType: 'json', url: '/api/v{api-version}/body', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts index e161cdaf0..b545d1817 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query'; import { client } from '../client.gen'; -import { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; +import { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from '../sdk.gen'; import type { CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, FooWowData, GetCallWithoutParametersAndResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ServiceWithEmptyTagData, TestErrorCodeData, TypesData, TypesResponse } from '../types.gen'; export type QueryKey = [ @@ -57,7 +57,7 @@ export const serviceWithEmptyTagOptions = (options?: Options>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...fnOptions, throwOnError: true @@ -71,7 +71,7 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...fnOptions, throwOnError: true @@ -493,7 +493,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial< export const postApiVbyApiVersionBodyMutation = (options?: Partial>): UseMutationOptions> => { const mutationOptions: UseMutationOptions> = { mutationFn: async (fnOptions) => { - const { data } = await apiVApiVersionBodyPost({ + const { data } = await postApiVbyApiVersionBody({ ...options, ...fnOptions, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/index.ts index c6833c00d..e45478b1d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionBodyPost, apiVApiVersionNo_tagPatch, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, foo_Wow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; +export { callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexTypes, deleteCallWithoutParametersAndResponse, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, fooWow, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionBody, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, serviceWithEmptyTag, testErrorCode, types } from './sdk.gen'; export type { ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, Date, Default, DeleteCallWithoutParametersAndResponseData, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponses, DummyBData, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithStrings, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, FailureFailure, FooWowData, FooWowResponses, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ModelThatExtends, ModelThatExtendsExtends, ModelWithArray, ModelWithBoolean, ModelWithCircularReference, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithInteger, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableString, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, OptionsCallWithoutParametersAndResponseData, ParameterActivityParams, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyError, PostApiVbyApiVersionBodyErrors, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyResponses, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, ResponsePostActivityResponse, ServiceWithEmptyTagData, SimpleBoolean, SimpleFile, SimpleInteger, SimpleReference, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts index fdc344691..6776488ce 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/fetch/sdk.gen.ts @@ -20,9 +20,9 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); -export const foo_Wow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -117,7 +117,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => (options.client ?? client).post({ +export const postApiVbyApiVersionBody = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/body', ...options, headers: { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts index 720c42465..bfd35f1d6 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import { type DefaultError, queryOptions, type UseMutationOptions } from '@tanstack/vue-query'; import { client } from '../client.gen'; -import { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from '../sdk.gen'; +import { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooBarResponse, GetFooData, GetFooResponse } from '../types.gen'; export type QueryKey = [ @@ -43,7 +43,7 @@ export const getFooD = (options?: Options) => createQueryKey('getFoo export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooGet({ + const { data } = await getFoo({ ...options, ...queryKey[0], signal, @@ -86,7 +86,7 @@ export const getFooBarD = (options?: Options) => createQueryKey(' export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { - const { data } = await fooBarGet({ + const { data } = await getFooBar({ ...options, ...queryKey[0], signal, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/index.ts index e42ffea2a..b3d19ebcd 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooBarGet, fooBarPost, fooBarPut, fooGet, fooPost, fooPut, type Options } from './sdk.gen'; +export { fooBarPost, fooBarPut, fooPost, fooPut, getFoo, getFooBar, type Options } from './sdk.gen'; export type { ClientOptions, FooBarPostData, FooBarPostResponse, FooBarPostResponses, FooBarPutData, FooBarPutResponse, FooBarPutResponses, FooPostData, FooPostResponse, FooPostResponses, FooPutData, FooPutResponse, FooPutResponses, GetFooBarData, GetFooBarResponse, GetFooBarResponses, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts index a52716c48..a70249590 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/vue-query/name-builder/sdk.gen.ts @@ -18,13 +18,13 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); export const fooPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo', ...options }); export const fooPut = (options?: Options) => (options?.client ?? client).put({ url: '/foo', ...options }); -export const fooBarGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); +export const getFooBar = (options?: Options) => (options?.client ?? client).get({ url: '/foo/bar', ...options }); export const fooBarPost = (options?: Options) => (options?.client ?? client).post({ url: '/foo/bar', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/index.ts index be3520b11..14b322279 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooGet, type Options } from './sdk.gen'; +export { getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetFooData, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/sdk.gen.ts index 109acae08..5bc66f5a1 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-api-key/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ +export const getFoo = (options?: Options) => (options?.client ?? client).get({ security: [{ in: 'query', name: 'foo', diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/index.ts index be3520b11..14b322279 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooGet, type Options } from './sdk.gen'; +export { getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetFooData, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/sdk.gen.ts index 96b60f170..8a29a51e2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-basic/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ +export const getFoo = (options?: Options) => (options?.client ?? client).get({ security: [{ scheme: 'basic', type: 'http' }], url: '/foo', ...options diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/index.ts index be3520b11..14b322279 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooGet, type Options } from './sdk.gen'; +export { getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetFooData, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/sdk.gen.ts index 4b61145cf..ab8ff3b10 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-false/sdk.gen.ts @@ -18,4 +18,4 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); +export const getFoo = (options?: Options) => (options?.client ?? client).get({ url: '/foo', ...options }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/index.ts index be3520b11..14b322279 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooGet, type Options } from './sdk.gen'; +export { getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetFooData, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/sdk.gen.ts index 9ae405876..491c86a21 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/security-oauth2/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ +export const getFoo = (options?: Options) => (options?.client ?? client).get({ security: [{ scheme: 'bearer', type: 'http' }], url: '/foo', ...options diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/index.ts index cffa17616..de1daea43 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { ClientOptions, PostFooData, PostFooResponse, PostFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/sdk.gen.ts index aadd6a1be..275283fad 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/body-response-text-plain/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooPost = (options: Options) => (options.client ?? client).post({ +export const postFoo = (options: Options) => (options.client ?? client).post({ bodySerializer: null, url: '/foo', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/index.ts index 0fd2c35c2..b8bd9b308 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooGet, type Options } from './sdk.gen'; +export { getFoo, type Options } from './sdk.gen'; export type { ClientOptions, GetFooData, GetFooResponse, GetFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/sdk.gen.ts index 497898597..bd418b635 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/content-types/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooGet = (options?: Options) => (options?.client ?? client).get({ +export const getFoo = (options?: Options) => (options?.client ?? client).get({ responseType: 'json', url: '/foo', ...options diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/index.ts index b7d647ad4..878d240fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { ClientOptions, PostFooData, PostFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/sdk.gen.ts index 7f967b14f..11ce35052 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false-axios/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ querySerializer: { parameters: { foo: { array: { explode: false } } } }, url: '/foo', ...options diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/index.ts index b7d647ad4..878d240fe 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { ClientOptions, PostFooData, PostFooResponses } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/sdk.gen.ts index 7f967b14f..11ce35052 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/parameter-explode-false/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ querySerializer: { parameters: { foo: { array: { explode: false } } } }, url: '/foo', ...options diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts index bd7df901f..8581d60b8 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/@angular/common.gen.ts @@ -7,44 +7,21 @@ import { client } from '../client.gen'; import type { Options } from '../sdk.gen'; import type { ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseData, CallWithResponseResponse, CallWithResponsesData, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, ComplexTypesResponse, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyAResponse, DummyBData, DummyBResponse, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FileResponseResponse, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, OptionsCallWithoutParametersAndResponseData, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, TypesResponse, UploadFileData, UploadFileResponse } from '../types.gen'; -export class No_tagRequests { - public static patch(options?: Options): HttpRequest { - return (options?.client ?? client).requestOptions({ - responseStyle: 'data', - method: 'PATCH', - url: '/api/v{api-version}/no+tag', - ...options - }); - } -} - -export class SimpleOperationRequests { - public static get(options: Options): HttpRequest { +@Injectable({ providedIn: 'root' }) +export class Default { + public static export(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', method: 'GET', - url: '/api/v{api-version}/simple:operation', + url: '/api/v{api-version}/no+tag', ...options }); } -} - -export class VApiVersionRequests { - static 'no+tagRequests' = No_tagRequests; - static simpleOperationRequests = SimpleOperationRequests; -} - -export class ApiRequests { - static vApiVersionRequests = VApiVersionRequests; -} - -@Injectable({ providedIn: 'root' }) -export class Default { - public static export(options?: Options): HttpRequest { + public static patchApiVbyApiVersionNoTag(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', - method: 'GET', + method: 'PATCH', url: '/api/v{api-version}/no+tag', ...options }); @@ -59,7 +36,7 @@ export class Default { }); } - public static 'foo+Wow'(options?: Options): HttpRequest { + public static fooWow(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', method: 'PUT', @@ -68,11 +45,19 @@ export class Default { }); } - static apiRequests = ApiRequests; + public static getApiVbyApiVersionSimpleOperation(options: Options): HttpRequest { + return (options?.client ?? client).requestOptions({ + responseStyle: 'data', + method: 'GET', + url: '/api/v{api-version}/simple:operation', + ...options + }); + } } +@Injectable({ providedIn: 'root' }) export class ODataControllerRequests { - public static $count(options?: Options): HttpRequest { + public static count(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', method: 'GET', @@ -82,14 +67,17 @@ export class ODataControllerRequests { } } +@Injectable({ providedIn: 'root' }) export class VVersionRequests { static oDataControllerRequests = ODataControllerRequests; } -export class ApiRequests2 { +@Injectable({ providedIn: 'root' }) +export class ApiRequests { static vVersionRequests = VVersionRequests; } +@Injectable({ providedIn: 'root' }) export class Simple { public static deleteCallWithoutParametersAndResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -154,9 +142,10 @@ export class Simple { }); } - static apiRequests = ApiRequests2; + static apiRequests = ApiRequests; } +@Injectable({ providedIn: 'root' }) export class Parameters { public static deleteFoo(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -204,6 +193,7 @@ export class Parameters { } } +@Injectable({ providedIn: 'root' }) export class Descriptions { public static callWithDescriptions(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -215,6 +205,7 @@ export class Descriptions { } } +@Injectable({ providedIn: 'root' }) export class Deprecated { /** * @deprecated @@ -229,8 +220,9 @@ export class Deprecated { } } -export class RequestBodyRequests { - public static post(options?: Options): HttpRequest { +@Injectable({ providedIn: 'root' }) +export class RequestBody { + public static postApiVbyApiVersionRequestBody(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', method: 'POST', @@ -240,20 +232,9 @@ export class RequestBodyRequests { } } -export class VApiVersionRequests2 { - static requestBodyRequests = RequestBodyRequests; -} - -export class ApiRequests3 { - static vApiVersionRequests = VApiVersionRequests2; -} - -export class RequestBody { - static apiRequests = ApiRequests3; -} - -export class FormDataRequests { - public static post(options?: Options): HttpRequest { +@Injectable({ providedIn: 'root' }) +export class FormData { + public static postApiVbyApiVersionFormData(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ responseStyle: 'data', method: 'POST', @@ -263,18 +244,7 @@ export class FormDataRequests { } } -export class VApiVersionRequests3 { - static formDataRequests = FormDataRequests; -} - -export class ApiRequests4 { - static vApiVersionRequests = VApiVersionRequests3; -} - -export class FormData { - static apiRequests = ApiRequests4; -} - +@Injectable({ providedIn: 'root' }) export class Defaults { public static callWithDefaultParameters(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -304,6 +274,7 @@ export class Defaults { } } +@Injectable({ providedIn: 'root' }) export class Duplicate { public static duplicateName(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -342,6 +313,7 @@ export class Duplicate { } } +@Injectable({ providedIn: 'root' }) export class NoContent { public static callWithNoContentResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -362,6 +334,7 @@ export class NoContent { } } +@Injectable({ providedIn: 'root' }) export class Response { public static callWithResponseAndNoContentResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -400,6 +373,7 @@ export class Response { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags1 { public static dummyA(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -420,6 +394,7 @@ export class MultipleTags1 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags2 { public static dummyA(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -440,6 +415,7 @@ export class MultipleTags2 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags3 { public static dummyB(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -451,6 +427,7 @@ export class MultipleTags3 { } } +@Injectable({ providedIn: 'root' }) export class CollectionFormat { public static collectionFormat(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -462,6 +439,7 @@ export class CollectionFormat { } } +@Injectable({ providedIn: 'root' }) export class Types { public static types(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -473,6 +451,7 @@ export class Types { } } +@Injectable({ providedIn: 'root' }) export class Upload { public static uploadFile(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -484,6 +463,7 @@ export class Upload { } } +@Injectable({ providedIn: 'root' }) export class FileResponse { public static fileResponse(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -495,6 +475,7 @@ export class FileResponse { } } +@Injectable({ providedIn: 'root' }) export class Complex { public static complexTypes(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -515,6 +496,7 @@ export class Complex { } } +@Injectable({ providedIn: 'root' }) export class Multipart { public static multipartResponse(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -535,6 +517,7 @@ export class Multipart { } } +@Injectable({ providedIn: 'root' }) export class Header { public static callWithResultFromHeader(options?: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -546,6 +529,7 @@ export class Header { } } +@Injectable({ providedIn: 'root' }) export class Error_ { public static testErrorCode(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -557,6 +541,7 @@ export class Error_ { } } +@Injectable({ providedIn: 'root' }) export class NonAsciiÆøåÆøÅöôêÊ { public static nonAsciiæøåÆøÅöôêÊ字符串(options: Options): HttpRequest { return (options?.client ?? client).requestOptions({ @@ -580,39 +565,19 @@ export class NonAsciiÆøåÆøÅöôêÊ { } } -export class No_tagResources { - public static patch(options?: () => Options | undefined) { +@Injectable({ providedIn: 'root' }) +export class Default2 { + public static export(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default.apiRequests.vApiVersionRequests['no+tagRequests'].patch(opts) : undefined; - }); - } -} - -export class SimpleOperationResources { - public static get(options: () => Options | undefined) { - return httpResource(() => { - const opts = options ? options() : undefined; - return opts ? Default.apiRequests.vApiVersionRequests.simpleOperationRequests.get(opts) : undefined; + return opts ? Default.export(opts) : undefined; }); } -} - -export class VApiVersionResources { - static 'no+tagResources' = No_tagResources; - static simpleOperationResources = SimpleOperationResources; -} - -export class ApiResources { - static vApiVersionResources = VApiVersionResources; -} - -export class Default2 { - public static export(options?: () => Options | undefined) { + public static patchApiVbyApiVersionNoTag(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default.export(opts) : undefined; + return opts ? Default.patchApiVbyApiVersionNoTag(opts) : undefined; }); } @@ -623,33 +588,42 @@ export class Default2 { }); } - public static 'foo+Wow'(options?: () => Options | undefined) { + public static fooWow(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Default['foo+Wow'](opts) : undefined; + return opts ? Default.fooWow(opts) : undefined; }); } - static apiResources = ApiResources; + public static getApiVbyApiVersionSimpleOperation(options: () => Options | undefined) { + return httpResource(() => { + const opts = options ? options() : undefined; + return opts ? Default.getApiVbyApiVersionSimpleOperation(opts) : undefined; + }); + } } +@Injectable({ providedIn: 'root' }) export class ODataControllerResources { - public static $count(options?: () => Options | undefined) { + public static count(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? Simple.apiRequests.vVersionRequests.oDataControllerRequests.$count(opts) : undefined; + return opts ? ODataControllerRequests.count(opts) : undefined; }); } } +@Injectable({ providedIn: 'root' }) export class VVersionResources { static oDataControllerResources = ODataControllerResources; } -export class ApiResources2 { +@Injectable({ providedIn: 'root' }) +export class ApiResources { static vVersionResources = VVersionResources; } +@Injectable({ providedIn: 'root' }) export class Simple2 { public static deleteCallWithoutParametersAndResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -700,9 +674,10 @@ export class Simple2 { }); } - static apiResources = ApiResources2; + static apiResources = ApiResources; } +@Injectable({ providedIn: 'root' }) export class Parameters2 { public static deleteFoo(options: () => Options | undefined) { return httpResource(() => { @@ -740,6 +715,7 @@ export class Parameters2 { } } +@Injectable({ providedIn: 'root' }) export class Descriptions2 { public static callWithDescriptions(options?: () => Options | undefined) { return httpResource(() => { @@ -749,6 +725,7 @@ export class Descriptions2 { } } +@Injectable({ providedIn: 'root' }) export class Deprecated2 { /** * @deprecated @@ -761,48 +738,27 @@ export class Deprecated2 { } } -export class RequestBodyResources { - public static post(options?: () => Options | undefined) { +@Injectable({ providedIn: 'root' }) +export class RequestBody2 { + public static postApiVbyApiVersionRequestBody(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? RequestBody.apiRequests.vApiVersionRequests.requestBodyRequests.post(opts) : undefined; + return opts ? RequestBody.postApiVbyApiVersionRequestBody(opts) : undefined; }); } } -export class VApiVersionResources2 { - static requestBodyResources = RequestBodyResources; -} - -export class ApiResources3 { - static vApiVersionResources = VApiVersionResources2; -} - -export class RequestBody2 { - static apiResources = ApiResources3; -} - -export class FormDataResources { - public static post(options?: () => Options | undefined) { +@Injectable({ providedIn: 'root' }) +export class FormData2 { + public static postApiVbyApiVersionFormData(options?: () => Options | undefined) { return httpResource(() => { const opts = options ? options() : undefined; - return opts ? FormData.apiRequests.vApiVersionRequests.formDataRequests.post(opts) : undefined; + return opts ? FormData.postApiVbyApiVersionFormData(opts) : undefined; }); } } -export class VApiVersionResources3 { - static formDataResources = FormDataResources; -} - -export class ApiResources4 { - static vApiVersionResources = VApiVersionResources3; -} - -export class FormData2 { - static apiResources = ApiResources4; -} - +@Injectable({ providedIn: 'root' }) export class Defaults2 { public static callWithDefaultParameters(options?: () => Options | undefined) { return httpResource(() => { @@ -826,6 +782,7 @@ export class Defaults2 { } } +@Injectable({ providedIn: 'root' }) export class Duplicate2 { public static duplicateName(options?: () => Options | undefined) { return httpResource(() => { @@ -856,6 +813,7 @@ export class Duplicate2 { } } +@Injectable({ providedIn: 'root' }) export class NoContent2 { public static callWithNoContentResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -872,6 +830,7 @@ export class NoContent2 { } } +@Injectable({ providedIn: 'root' }) export class Response2 { public static callWithResponseAndNoContentResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -902,6 +861,7 @@ export class Response2 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags12 { public static dummyA(options?: () => Options | undefined) { return httpResource(() => { @@ -918,6 +878,7 @@ export class MultipleTags12 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags22 { public static dummyA(options?: () => Options | undefined) { return httpResource(() => { @@ -934,6 +895,7 @@ export class MultipleTags22 { } } +@Injectable({ providedIn: 'root' }) export class MultipleTags32 { public static dummyB(options?: () => Options | undefined) { return httpResource(() => { @@ -943,6 +905,7 @@ export class MultipleTags32 { } } +@Injectable({ providedIn: 'root' }) export class CollectionFormat2 { public static collectionFormat(options: () => Options | undefined) { return httpResource(() => { @@ -952,6 +915,7 @@ export class CollectionFormat2 { } } +@Injectable({ providedIn: 'root' }) export class Types2 { public static types(options: () => Options | undefined) { return httpResource(() => { @@ -961,6 +925,7 @@ export class Types2 { } } +@Injectable({ providedIn: 'root' }) export class Upload2 { public static uploadFile(options: () => Options | undefined) { return httpResource(() => { @@ -970,6 +935,7 @@ export class Upload2 { } } +@Injectable({ providedIn: 'root' }) export class FileResponse2 { public static fileResponse(options: () => Options | undefined) { return httpResource(() => { @@ -979,6 +945,7 @@ export class FileResponse2 { } } +@Injectable({ providedIn: 'root' }) export class Complex2 { public static complexTypes(options: () => Options | undefined) { return httpResource(() => { @@ -995,6 +962,7 @@ export class Complex2 { } } +@Injectable({ providedIn: 'root' }) export class Multipart2 { public static multipartResponse(options?: () => Options | undefined) { return httpResource(() => { @@ -1011,6 +979,7 @@ export class Multipart2 { } } +@Injectable({ providedIn: 'root' }) export class Header2 { public static callWithResultFromHeader(options?: () => Options | undefined) { return httpResource(() => { @@ -1020,6 +989,7 @@ export class Header2 { } } +@Injectable({ providedIn: 'root' }) export class Error2 { public static testErrorCode(options: () => Options | undefined) { return httpResource(() => { @@ -1029,6 +999,7 @@ export class Error2 { } } +@Injectable({ providedIn: 'root' }) export class NonAsciiÆøåÆøÅöôêÊ2 { public static nonAsciiæøåÆøÅöôêÊ字符串(options: () => Options | undefined) { return httpResource(() => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/index.ts index ae3813b44..62e4bbff0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionFormDataPost, apiVApiVersionNo_tagPatch, apiVApiVersionRequestBodyPost, apiVApiVersionSimpleOperationGet, apiVVersionODataController__count, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, foo_Wow, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; +export { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; export type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/sdk.gen.ts index 277bf8ef3..e48dcff8c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default-class/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); export const import_ = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/no+tag', @@ -31,11 +31,11 @@ export const import_ = (options: Options(options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVVersionODataController__count = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); +export const apiVVersionODataControllerCount = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); -export const apiVApiVersionSimpleOperationGet = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); +export const getApiVbyApiVersionSimpleOperation = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -96,7 +96,7 @@ export const postCallWithOptionalParam = ( } }); -export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionRequestBody = (options?: Options) => (options?.client ?? client).post({ url: '/api/v{api-version}/requestBody', ...options, headers: { @@ -105,7 +105,7 @@ export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionFormData = (options?: Options) => (options?.client ?? client).post({ ...formDataBodySerializer, url: '/api/v{api-version}/formData', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/index.ts index ae3813b44..62e4bbff0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionFormDataPost, apiVApiVersionNo_tagPatch, apiVApiVersionRequestBodyPost, apiVApiVersionSimpleOperationGet, apiVVersionODataController__count, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, foo_Wow, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; +export { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; export type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/sdk.gen.ts index 277bf8ef3..e48dcff8c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@angular/common/default/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); export const import_ = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/no+tag', @@ -31,11 +31,11 @@ export const import_ = (options: Options(options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVVersionODataController__count = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); +export const apiVVersionODataControllerCount = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); -export const apiVApiVersionSimpleOperationGet = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); +export const getApiVbyApiVersionSimpleOperation = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -96,7 +96,7 @@ export const postCallWithOptionalParam = ( } }); -export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionRequestBody = (options?: Options) => (options?.client ?? client).post({ url: '/api/v{api-version}/requestBody', ...options, headers: { @@ -105,7 +105,7 @@ export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionFormData = (options?: Options) => (options?.client ?? client).post({ ...formDataBodySerializer, url: '/api/v{api-version}/formData', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts index a1beb0a63..fafb8ed66 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/sdk.gen.ts @@ -54,10 +54,6 @@ export class Domains extends HeyApiClient { public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/business/providers/domains', ...options }); } - - public put(options?: Options) { - return (options?.client ?? this.client).put({ url: '/business/providers/domains', ...options }); - } } export class Providers extends HeyApiClient { @@ -89,6 +85,10 @@ export class NestedSdkWithInstance extends HeyApiClient { NestedSdkWithInstance.__registry.set(this, args?.key); } + public putBusinessProvidersDomains(options?: Options) { + return (options?.client ?? this.client).put({ url: '/business/providers/domains', ...options }); + } + public get(options?: Options) { return (options?.client ?? this.client).get({ url: '/locations', ...options }); } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts index 505a12a57..babd05bc9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/sdk.gen.ts @@ -74,10 +74,6 @@ export class Domains3 { public static post(options?: Options) { return (options?.client ?? client).post({ url: '/business/providers/domains', ...options }); } - - public static put(options?: Options) { - return (options?.client ?? client).put({ url: '/business/providers/domains', ...options }); - } } export class Providers4 { @@ -89,6 +85,10 @@ export class Business4 { } export class Domains4 { + public static putBusinessProvidersDomains(options?: Options) { + return (options?.client ?? client).put({ url: '/business/providers/domains', ...options }); + } + static business = Business4; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/index.ts index ae3813b44..62e4bbff0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionFormDataPost, apiVApiVersionNo_tagPatch, apiVApiVersionRequestBodyPost, apiVApiVersionSimpleOperationGet, apiVVersionODataController__count, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, foo_Wow, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; +export { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; export type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts index 277bf8ef3..e48dcff8c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/default/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); export const import_ = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/no+tag', @@ -31,11 +31,11 @@ export const import_ = (options: Options(options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVVersionODataController__count = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); +export const apiVVersionODataControllerCount = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); -export const apiVApiVersionSimpleOperationGet = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); +export const getApiVbyApiVersionSimpleOperation = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -96,7 +96,7 @@ export const postCallWithOptionalParam = ( } }); -export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionRequestBody = (options?: Options) => (options?.client ?? client).post({ url: '/api/v{api-version}/requestBody', ...options, headers: { @@ -105,7 +105,7 @@ export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionFormData = (options?: Options) => (options?.client ?? client).post({ ...formDataBodySerializer, url: '/api/v{api-version}/formData', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts index 060d7ded1..af464f9b9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/instance/sdk.gen.ts @@ -47,10 +47,6 @@ class HeyApiRegistry { } export class Bar extends HeyApiClient { - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/foo/bar', ...options }); - } - public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/foo/bar', ...options }); } @@ -61,10 +57,6 @@ export class Bar extends HeyApiClient { } export class Foo extends HeyApiClient { - public get(options?: Options) { - return (options?.client ?? this.client).get({ url: '/foo', ...options }); - } - public post(options?: Options) { return (options?.client ?? this.client).post({ url: '/foo', ...options }); } @@ -90,6 +82,14 @@ export class Sdk extends HeyApiClient { Sdk.__registry.set(this, args?.key); } + public getFoo(options?: Options) { + return (options?.client ?? this.client).get({ url: '/foo', ...options }); + } + + public getFooBar(options?: Options) { + return (options?.client ?? this.client).get({ url: '/foo/bar', ...options }); + } + private _foo?: Foo; get foo(): Foo { return this._foo ??= new Foo({ client: this.client }); diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/index.ts index ae3813b44..62e4bbff0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { apiVApiVersionFormDataPost, apiVApiVersionNo_tagPatch, apiVApiVersionRequestBodyPost, apiVApiVersionSimpleOperationGet, apiVVersionODataController__count, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, foo_Wow, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; +export { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, headCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, optionsCallWithoutParametersAndResponse, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from './sdk.gen'; export type { _3eNum1Период, _400, AdditionalPropertiesIntegerIssue, AdditionalPropertiesUnknownIssue, AdditionalPropertiesUnknownIssue2, AdditionalPropertiesUnknownIssue3, AdditionalPropertiesUnknownIssueWritable, AnyOfAnyAndNull, AnyOfArrays, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, ApiVVersionODataControllerCountResponses, ArrayWithAnyOfProperties, ArrayWithArray, ArrayWithBooleans, ArrayWithNumbers, ArrayWithProperties, ArrayWithReferences, ArrayWithStrings, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesErrors, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesResponses, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithNoContentResponseResponses, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, CallWithResponseAndNoContentResponseResponses, CallWithResponseData, CallWithResponseResponse, CallWithResponseResponses, CallWithResponsesData, CallWithResponsesError, CallWithResponsesErrors, CallWithResponsesResponse, CallWithResponsesResponses, CallWithResultFromHeaderData, CallWithResultFromHeaderErrors, CallWithResultFromHeaderResponses, CallWithWeirdParameterNamesData, CamelCaseCommentWithBreaks, CharactersInDescription, ClientOptions, CollectionFormatData, CommentWithBackticks, CommentWithBackticksAndQuotes, CommentWithBreaks, CommentWithExpressionPlaceholders, CommentWithQuotes, CommentWithReservedCharacters, CommentWithSlashes, ComplexParamsData, ComplexParamsResponse, ComplexParamsResponses, ComplexTypesData, ComplexTypesErrors, ComplexTypesResponse, ComplexTypesResponses, CompositionBaseModel, CompositionExtendedModel, CompositionWithAllOfAndNullable, CompositionWithAnyOf, CompositionWithAnyOfAndNullable, CompositionWithAnyOfAnonymous, CompositionWithNestedAnyAndTypeNull, CompositionWithNestedAnyOfAndNull, CompositionWithOneOf, CompositionWithOneOfAndComplexArrayDictionary, CompositionWithOneOfAndNullable, CompositionWithOneOfAndProperties, CompositionWithOneOfAndSimpleArrayDictionary, CompositionWithOneOfAndSimpleDictionary, CompositionWithOneOfAnonymous, CompositionWithOneOfDiscriminator, ConstValue, Default, DeleteCallWithoutParametersAndResponseData, DeleteFooData, DeleteFooData2, DeleteFooData3, DeprecatedCallData, DeprecatedModel, DictionaryWithArray, DictionaryWithDictionary, DictionaryWithProperties, DictionaryWithPropertiesAndAdditionalProperties, DictionaryWithReference, DictionaryWithString, DummyAData, DummyAResponse, DummyAResponses, DummyBData, DummyBResponse, DummyBResponses, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, EnumFromDescription, EnumWithExtensions, EnumWithNumbers, EnumWithReplacedCharacters, EnumWithStrings, EnumWithXEnumNames, ExportData, ExternalRefA, ExternalRefB, ExternalSharedExternalSharedModel, File, FileResponseData, FileResponseResponse, FileResponseResponses, FileWritable, FooWowData, FooWowResponses, FreeFormObjectWithAdditionalPropertiesEqEmptyObject, FreeFormObjectWithAdditionalPropertiesEqTrue, FreeFormObjectWithoutAdditionalProperties, GenericSchemaDuplicateIssue1SystemBoolean, GenericSchemaDuplicateIssue1SystemBooleanWritable, GenericSchemaDuplicateIssue1SystemString, GenericSchemaDuplicateIssue1SystemStringWritable, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationError, GetApiVbyApiVersionSimpleOperationErrors, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationResponses, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, Import, ImportData, ImportResponse, ImportResponses, IoK8sApimachineryPkgApisMetaV1DeleteOptions, IoK8sApimachineryPkgApisMetaV1Preconditions, ModelCircle, ModelFromZendesk, ModelSquare, ModelThatExtends, ModelThatExtendsExtends, ModelWithAdditionalPropertiesEqTrue, ModelWithAnyOfConstantSizeArray, ModelWithAnyOfConstantSizeArrayAndIntersect, ModelWithAnyOfConstantSizeArrayNullable, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions, ModelWithAnyOfConstantSizeArrayWithNSizeAndOptionsWritable, ModelWithArray, ModelWithArrayReadOnlyAndWriteOnly, ModelWithArrayReadOnlyAndWriteOnlyWritable, ModelWithBackticksInDescription, ModelWithBoolean, ModelWithCircularReference, ModelWithConst, ModelWithConstantSizeArray, ModelWithDictionary, ModelWithDuplicateImports, ModelWithDuplicateProperties, ModelWithEnum, ModelWithEnumFromDescription, ModelWithEnumWithHyphen, ModelWithInteger, ModelWithNestedArrayEnums, ModelWithNestedArrayEnumsData, ModelWithNestedArrayEnumsDataBar, ModelWithNestedArrayEnumsDataFoo, ModelWithNestedCompositionEnums, ModelWithNestedEnums, ModelWithNestedProperties, ModelWithNullableObject, ModelWithNullableString, ModelWithNumericEnumUnion, ModelWithOneOfAndProperties, ModelWithOneOfEnum, ModelWithOrderedProperties, ModelWithPattern, ModelWithPatternWritable, ModelWithPrefixItemsConstantSizeArray, ModelWithProperties, ModelWithPropertiesWritable, ModelWithReadOnlyAndWriteOnly, ModelWithReadOnlyAndWriteOnlyWritable, ModelWithReference, ModelWithReferenceWritable, ModelWithString, ModelWithStringError, MultipartRequestData, MultipartResponseData, MultipartResponseResponse, MultipartResponseResponses, NestedAnyOfArraysNullable, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, NonAsciiæøåÆøÅöôêÊ字符串Responses, NonAsciiStringæøåÆøÅöôêÊ字符串, NullableObject, OneOfAllOfIssue, OneOfAllOfIssueWritable, OptionsCallWithoutParametersAndResponseData, Pageable, ParameterSimpleParameterUnused, PatchApiVbyApiVersionNoTagData, PatchApiVbyApiVersionNoTagResponses, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithOptionalParamResponses, PostCallWithoutParametersAndResponseData, PostServiceWithEmptyTagResponse, PostServiceWithEmptyTagResponse2, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, SchemaWithFormRestrictedKeys, SimpleBoolean, SimpleFile, SimpleFormData, SimpleInteger, SimpleParameter, SimpleReference, SimpleRequestBody, SimpleString, SimpleStringWithPattern, TestErrorCodeData, TestErrorCodeErrors, TestErrorCodeResponses, TypesData, TypesResponse, TypesResponses, UploadFileData, UploadFileResponse, UploadFileResponses, XFooBar } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts index a805c6bc1..8d362960f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/sdk/throwOnError/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options(options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVApiVersionNo_tagPatch = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); +export const patchApiVbyApiVersionNoTag = (options?: Options) => (options?.client ?? client).patch({ url: '/api/v{api-version}/no+tag', ...options }); export const import_ = (options: Options) => (options.client ?? client).post({ url: '/api/v{api-version}/no+tag', @@ -31,11 +31,11 @@ export const import_ = (options: Options(options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); +export const fooWow = (options?: Options) => (options?.client ?? client).put({ url: '/api/v{api-version}/no+tag', ...options }); -export const apiVVersionODataController__count = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); +export const apiVVersionODataControllerCount = (options?: Options) => (options?.client ?? client).get({ url: '/api/v{api-version}/simple/$count', ...options }); -export const apiVApiVersionSimpleOperationGet = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); +export const getApiVbyApiVersionSimpleOperation = (options: Options) => (options.client ?? client).get({ url: '/api/v{api-version}/simple:operation', ...options }); export const deleteCallWithoutParametersAndResponse = (options?: Options) => (options?.client ?? client).delete({ url: '/api/v{api-version}/simple', ...options }); @@ -96,7 +96,7 @@ export const postCallWithOptionalParam = (o } }); -export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionRequestBody = (options?: Options) => (options?.client ?? client).post({ url: '/api/v{api-version}/requestBody', ...options, headers: { @@ -105,7 +105,7 @@ export const apiVApiVersionRequestBodyPost = (options?: Options) => (options?.client ?? client).post({ +export const postApiVbyApiVersionFormData = (options?: Options) => (options?.client ?? client).post({ ...formDataBodySerializer, url: '/api/v{api-version}/formData', ...options, diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts index 61e4b126b..8dc6d0499 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts index 8d5af124b..b443e6ac2 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-valibot/sdk.gen.ts @@ -22,7 +22,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ requestValidator: async (data) => await v.parseAsync(vPostFooData, data), responseTransformer: postFooResponseTransformer, responseValidator: async (data) => await v.parseAsync(vPostFooResponse, data), diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts index 61e4b126b..8dc6d0499 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { fooPost, type Options } from './sdk.gen'; +export { type Options, postFoo } from './sdk.gen'; export type { Bar, ClientOptions, Foo, PostFooData, PostFooResponse, PostFooResponses, TypeID, UserId } from './types.gen'; diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts index 56a6a3fd7..db455df67 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@hey-api/transformers/type-format-zod/sdk.gen.ts @@ -20,7 +20,7 @@ export type Options; }; -export const fooPost = (options?: Options) => (options?.client ?? client).post({ +export const postFoo = (options?: Options) => (options?.client ?? client).post({ requestValidator: async (data) => await zPostFooData.parseAsync(data), responseTransformer: postFooResponseTransformer, responseValidator: async (data) => await zPostFooResponse.parseAsync(data), diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts index 84f186999..84e2f19a3 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/@pinia/colada.gen.ts @@ -4,7 +4,7 @@ import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@p import { serializeQueryKeyValue } from '../client'; import { client } from '../client.gen'; -import { BarBazService, FooBazService, type Options } from '../sdk.gen'; +import { BarBazService, BarService, FooBazService, FooService, type Options } from '../sdk.gen'; import type { FooBarPostData, FooBarPostResponse, FooBarPutData, FooBarPutResponse, FooPostData, FooPostResponse, FooPutData, FooPutResponse, GetFooBarData, GetFooData } from '../types.gen'; export type QueryKey = [ @@ -47,7 +47,7 @@ export const getFooQueryKey = (options?: Options) => createQueryKey( export const getFooQuery = defineQueryOptions((options?: Options) => ({ key: getFooQueryKey(options), query: async (context) => { - const { data } = await FooBazService.fooService.get({ + const { data } = await FooBazService.getFoo({ ...options, ...context, throwOnError: true @@ -58,7 +58,7 @@ export const getFooQuery = defineQueryOptions((options?: Options) => export const fooPostMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.post({ + const { data } = await FooService.post({ ...options, ...vars, throwOnError: true @@ -69,7 +69,7 @@ export const fooPostMutation = (options?: Partial>): UseMut export const fooPutMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.put({ + const { data } = await FooService.put({ ...options, ...vars, throwOnError: true @@ -83,7 +83,7 @@ export const getFooBarQueryKey = (options?: Options) => createQue export const getFooBarQuery = defineQueryOptions((options?: Options) => ({ key: getFooBarQueryKey(options), query: async (context) => { - const { data } = await BarBazService.fooService.barService.get({ + const { data } = await BarBazService.getFooBar({ ...options, ...context, throwOnError: true @@ -94,7 +94,7 @@ export const getFooBarQuery = defineQueryOptions((options?: Options>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.barService.post({ + const { data } = await BarService.post({ ...options, ...vars, throwOnError: true @@ -105,7 +105,7 @@ export const fooBarPostMutation = (options?: Partial>): export const fooBarPutMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await FooBazService.fooService.barService.put({ + const { data } = await BarService.put({ ...options, ...vars, throwOnError: true diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts index 951c71fca..81b7e79ea 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/asClass/sdk.gen.ts @@ -29,10 +29,6 @@ export class BarService { } export class FooService { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo', ...options }); } @@ -45,14 +41,14 @@ export class FooService { } export class FooBazService { + public static getFoo(options?: Options) { + return (options?.client ?? client).get({ url: '/foo', ...options }); + } + static fooService = FooService; } export class BarService2 { - public static get(options?: Options) { - return (options?.client ?? client).get({ url: '/foo/bar', ...options }); - } - public static post(options?: Options) { return (options?.client ?? client).post({ url: '/foo/bar', ...options }); } @@ -67,5 +63,9 @@ export class FooService2 { } export class BarBazService { + public static getFooBar(options?: Options) { + return (options?.client ?? client).get({ url: '/foo/bar', ...options }); + } + static fooService = FooService2; } diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts index 6eba11388..81651e8f9 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@pinia/colada/fetch/@pinia/colada.gen.ts @@ -4,7 +4,7 @@ import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@p import { serializeQueryKeyValue } from '../client'; import { client } from '../client.gen'; -import { apiVApiVersionFormDataPost, apiVApiVersionNo_tagPatch, apiVApiVersionRequestBodyPost, apiVApiVersionSimpleOperationGet, apiVVersionODataController__count, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, foo_Wow, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchCallWithoutParametersAndResponse, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen'; +import { apiVVersionODataControllerCount, callToTestOrderOfParams, callWithDefaultOptionalParameters, callWithDefaultParameters, callWithDescriptions, callWithDuplicateResponses, callWithNoContentResponse, callWithParameters, callWithResponse, callWithResponseAndNoContentResponse, callWithResponses, callWithResultFromHeader, callWithWeirdParameterNames, collectionFormat, complexParams, complexTypes, deleteCallWithoutParametersAndResponse, deleteFoo, deprecatedCall, dummyA, dummyB, duplicateName, duplicateName2, duplicateName3, duplicateName4, export_, fileResponse, fooWow, getApiVbyApiVersionSimpleOperation, getCallWithOptionalParam, getCallWithoutParametersAndResponse, import_, multipartRequest, multipartResponse, nonAsciiæøåÆøÅöôêÊ字符串, type Options, patchApiVbyApiVersionNoTag, patchCallWithoutParametersAndResponse, postApiVbyApiVersionFormData, postApiVbyApiVersionRequestBody, postCallWithOptionalParam, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, putWithFormUrlEncoded, testErrorCode, types, uploadFile } from '../sdk.gen'; import type { ApiVVersionODataControllerCountData, CallToTestOrderOfParamsData, CallWithDefaultOptionalParametersData, CallWithDefaultParametersData, CallWithDescriptionsData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithNoContentResponseData, CallWithParametersData, CallWithResponseAndNoContentResponseData, CallWithResponseData, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CallWithResultFromHeaderData, CallWithWeirdParameterNamesData, CollectionFormatData, ComplexParamsData, ComplexParamsResponse, ComplexTypesData, DeleteCallWithoutParametersAndResponseData, DeleteFooData3, DeprecatedCallData, DummyAData, DummyBData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, DuplicateNameData, ExportData, FileResponseData, FooWowData, GetApiVbyApiVersionSimpleOperationData, GetCallWithOptionalParamData, GetCallWithoutParametersAndResponseData, ImportData, ImportResponse, MultipartRequestData, MultipartResponseData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PatchApiVbyApiVersionNoTagData, PatchCallWithoutParametersAndResponseData, PostApiVbyApiVersionFormDataData, PostApiVbyApiVersionRequestBodyData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, PutWithFormUrlEncodedData, TestErrorCodeData, TypesData, UploadFileData, UploadFileResponse } from '../types.gen'; export type QueryKey = [ @@ -58,7 +58,7 @@ export const exportQuery = defineQueryOptions((options?: Options) => export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await apiVApiVersionNo_tagPatch({ + const { data } = await patchApiVbyApiVersionNoTag({ ...options, ...vars, throwOnError: true @@ -80,7 +80,7 @@ export const importMutation = (options?: Partial>): UseMutat export const fooWowMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await foo_Wow({ + const { data } = await fooWow({ ...options, ...vars, throwOnError: true @@ -94,7 +94,7 @@ export const apiVVersionODataControllerCountQueryKey = (options?: Options) => ({ key: apiVVersionODataControllerCountQueryKey(options), query: async (context) => { - const { data } = await apiVVersionODataController__count({ + const { data } = await apiVVersionODataControllerCount({ ...options, ...context, throwOnError: true @@ -108,7 +108,7 @@ export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => ({ key: getApiVbyApiVersionSimpleOperationQueryKey(options), query: async (context) => { - const { data } = await apiVApiVersionSimpleOperationGet({ + const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...context, throwOnError: true @@ -260,7 +260,7 @@ export const postCallWithOptionalParamMutation = (options?: Partial>): UseMutationOptions, Error> => ({ mutation: async (vars) => { - const { data } = await apiVApiVersionRequestBodyPost({ + const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...vars, throwOnError: true @@ -271,7 +271,7 @@ export const postApiVbyApiVersionRequestBodyMutation = (options?: Partial