diff --git a/dev/openapi-ts.config.ts b/dev/openapi-ts.config.ts index abef2163a..18342cece 100644 --- a/dev/openapi-ts.config.ts +++ b/dev/openapi-ts.config.ts @@ -41,9 +41,9 @@ export default defineConfig(() => { // 'circular.yaml', // 'dutchie.json', // 'invalid', - // 'full.yaml', + 'full.yaml', // 'openai.yaml', - 'opencode.yaml', + // 'opencode.yaml', // 'sdk-instance.yaml', // 'string-with-format.yaml', // 'transformers.json', @@ -319,9 +319,10 @@ export default defineConfig(() => { }, }, name: '@tanstack/react-query', - // queryKeys: { - // name: '{{name}}QK', - // }, + queryKeys: { + // name: '{{name}}QK', + tags: true, + }, // queryOptions: false, queryOptions: { // meta() { 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 9595e7671..989426b60 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 74b99afc0..c35157d7b 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 @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -198,7 +198,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -255,7 +255,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -298,7 +298,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -313,7 +313,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -328,7 +328,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -343,7 +343,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -358,7 +358,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -401,7 +401,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -416,7 +416,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -431,7 +431,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { 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 470dadda3..b9dd74246 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -197,7 +197,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -254,7 +254,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -297,7 +297,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -312,7 +312,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -327,7 +327,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -342,7 +342,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -357,7 +357,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -400,7 +400,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -415,7 +415,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -430,7 +430,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 d8a62fc08..72609d675 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 a062a3b93..feeb50886 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 61b27f049..a7bbd46cc 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 @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -198,7 +198,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -255,7 +255,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -298,7 +298,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -313,7 +313,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -328,7 +328,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -343,7 +343,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -358,7 +358,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -401,7 +401,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -416,7 +416,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -431,7 +431,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { 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 fc9cab81e..49fec971b 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -197,7 +197,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -254,7 +254,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -297,7 +297,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -312,7 +312,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -327,7 +327,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -342,7 +342,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -357,7 +357,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -400,7 +400,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -415,7 +415,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -430,7 +430,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 f4fdef85a..a2dc5d5d6 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 c59acb806..7b5bf27b8 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 4320073c7..54b8e3aaa 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 @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -198,7 +198,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -255,7 +255,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -298,7 +298,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -313,7 +313,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -328,7 +328,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -343,7 +343,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -358,7 +358,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -401,7 +401,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -416,7 +416,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -431,7 +431,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { 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 9ad6ce9a0..b1c4100d1 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -197,7 +197,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -254,7 +254,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -297,7 +297,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -312,7 +312,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -327,7 +327,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -342,7 +342,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -357,7 +357,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -400,7 +400,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -415,7 +415,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -430,7 +430,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 8ac1578e2..f84e2391b 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 8be6a5449..4d282459c 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 a15d883c0..76da712c3 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 @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -198,7 +198,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -255,7 +255,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -298,7 +298,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -313,7 +313,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -328,7 +328,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -343,7 +343,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -358,7 +358,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -401,7 +401,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -416,7 +416,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -431,7 +431,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { 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 b61b5c212..2fb721a74 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -197,7 +197,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -254,7 +254,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -297,7 +297,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -312,7 +312,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -327,7 +327,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -342,7 +342,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -357,7 +357,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -400,7 +400,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -415,7 +415,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -430,7 +430,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 f1e3d047c..9a52baa3d 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 58ad0c652..c9065f58e 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 8540db08f..4fb5f5127 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 @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -198,7 +198,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -255,7 +255,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -298,7 +298,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -313,7 +313,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -328,7 +328,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -343,7 +343,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -358,7 +358,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -401,7 +401,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -416,7 +416,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -431,7 +431,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { 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 0dc98d30d..f75a32be9 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey("serviceWithEmptyTag", options); export const serviceWithEmptyTagOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -197,7 +197,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -254,7 +254,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -297,7 +297,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -312,7 +312,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -327,7 +327,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -342,7 +342,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -357,7 +357,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -400,7 +400,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -415,7 +415,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -430,7 +430,7 @@ export const typesOptions = (options: Options) => queryOptions) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { 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 543052e8b..ffb75dcd0 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 @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts index 8b9d934d6..8d60023d0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const createQueryKey2 = (options?: Options) => createQueryKey('create', options); +export const createQueryKey2 = (options?: Options) => createQueryKey("create", options); export const createOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 9595e7671..989426b60 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts index d9287791b..5e935efaf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts index 0ebbbf9f0..0eba11ced 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts index d8a62fc08..72609d675 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index a062a3b93..feeb50886 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts index 72ae6ef5e..efad5fa02 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts index ea6184ce9..a555bfe65 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts index f4fdef85a..a2dc5d5d6 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts index c59acb806..7b5bf27b8 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts index 9fd0a0ad0..f123d6ac4 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts index 73518d5c1..03778b370 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts index 8ac1578e2..f84e2391b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts index 8be6a5449..4d282459c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts index a1480e1ce..77ceb41bc 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts index c2c1cc32e..007d99d46 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts index f1e3d047c..9a52baa3d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts index 58ad0c652..c9065f58e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts index 7ea0740c3..bf4850bf3 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts index 11a71d5a3..673c3b95f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts index 543052e8b..ffb75dcd0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts index 8b9d934d6..8d60023d0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const createQueryKey2 = (options?: Options) => createQueryKey('create', options); +export const createQueryKey2 = (options?: Options) => createQueryKey("create", options); export const createOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/@tanstack/react-query.gen.ts index 40db0b220..32b258b88 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/pagination-ref/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -87,7 +87,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getFooInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getFoo', options, true); +export const getFooInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getFoo", options, true); export const getFooInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 9595e7671..989426b60 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts index d9287791b..5e935efaf 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts index 0ebbbf9f0..0eba11ced 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts index d8a62fc08..72609d675 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/name-builder/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index a062a3b93..feeb50886 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts index 72ae6ef5e..efad5fa02 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts index ea6184ce9..a555bfe65 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts index f4fdef85a..a2dc5d5d6 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/name-builder/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts index c59acb806..7b5bf27b8 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts index 9fd0a0ad0..f123d6ac4 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts index 73518d5c1..03778b370 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts index 8ac1578e2..f84e2391b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/name-builder/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts index 8be6a5449..4d282459c 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts index a1480e1ce..77ceb41bc 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts index c2c1cc32e..007d99d46 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): Mutation return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts index f1e3d047c..9a52baa3d 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/name-builder/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): MutationOptions return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts index 58ad0c652..c9065f58e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const getFooBarQueryKey = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarQueryKey = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts index 7ea0740c3..bf4850bf3 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts @@ -42,7 +42,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -99,7 +99,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions, ApiVVersionODataControllerCountResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -114,7 +114,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions, GetApiVbyApiVersionSimpleOperationResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -143,7 +143,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -273,7 +273,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -319,7 +319,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -387,7 +387,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -444,7 +444,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -487,7 +487,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions, CallWithNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -502,7 +502,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions, CallWithResponseAndNoContentResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -517,7 +517,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions, DummyAResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -532,7 +532,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions, DummyBResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -547,7 +547,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions, CallWithResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -590,7 +590,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions, unknown, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -605,7 +605,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions, TypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -634,7 +634,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions, FileResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -649,7 +649,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions, ComplexTypesResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { @@ -664,7 +664,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions, MultipartResponseResponse, ReturnType>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts index 11a71d5a3..673c3b95f 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const exportQueryKey = (options?: Options) => createQueryKey('export', options); +export const exportQueryKey = (options?: Options) => createQueryKey("export", options); export const exportOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -98,7 +98,7 @@ export const fooWowMutation = (options?: Partial>): UseMutat return mutationOptions; }; -export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey("apiVVersionODataControllerCount", options); export const apiVVersionODataControllerCountOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -113,7 +113,7 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey("getApiVbyApiVersionSimpleOperation", options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -142,7 +142,7 @@ export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial return mutationOptions; }; -export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey("getCallWithoutParametersAndResponse", options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -272,7 +272,7 @@ export const callWithWeirdParameterNamesMutation = (options?: Partial) => createQueryKey('getCallWithOptionalParam', options); +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey("getCallWithOptionalParam", options); export const getCallWithOptionalParamOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -318,7 +318,7 @@ const createInfiniteParams = [0], 'body' | 'hea return params as unknown as typeof page; }; -export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey("getCallWithOptionalParam", options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( @@ -386,7 +386,7 @@ export const postApiVbyApiVersionFormDataMutation = (options?: Partial) => createQueryKey('callWithDefaultParameters', options); +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey("callWithDefaultParameters", options); export const callWithDefaultParametersOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -443,7 +443,7 @@ export const duplicateNameMutation = (options?: Partial) => createQueryKey('duplicateName2', options); +export const duplicateName2QueryKey = (options?: Options) => createQueryKey("duplicateName2", options); export const duplicateName2Options = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -486,7 +486,7 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithNoContentResponse", options); export const callWithNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -501,7 +501,7 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey("callWithResponseAndNoContentResponse", options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -516,7 +516,7 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); +export const dummyAQueryKey = (options?: Options) => createQueryKey("dummyA", options); export const dummyAOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -531,7 +531,7 @@ export const dummyAOptions = (options?: Options) => queryOptions) => createQueryKey('dummyB', options); +export const dummyBQueryKey = (options?: Options) => createQueryKey("dummyB", options); export const dummyBOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -546,7 +546,7 @@ export const dummyBOptions = (options?: Options) => queryOptions) => createQueryKey('callWithResponse', options); +export const callWithResponseQueryKey = (options?: Options) => createQueryKey("callWithResponse", options); export const callWithResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -589,7 +589,7 @@ export const callWithResponsesMutation = (options?: Partial) => createQueryKey('collectionFormat', options); +export const collectionFormatQueryKey = (options: Options) => createQueryKey("collectionFormat", options); export const collectionFormatOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -604,7 +604,7 @@ export const collectionFormatOptions = (options: Options) queryKey: collectionFormatQueryKey(options) }); -export const typesQueryKey = (options: Options) => createQueryKey('types', options); +export const typesQueryKey = (options: Options) => createQueryKey("types", options); export const typesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -633,7 +633,7 @@ export const uploadFileMutation = (options?: Partial>): return mutationOptions; }; -export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); +export const fileResponseQueryKey = (options: Options) => createQueryKey("fileResponse", options); export const fileResponseOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -648,7 +648,7 @@ export const fileResponseOptions = (options: Options) => query queryKey: fileResponseQueryKey(options) }); -export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); +export const complexTypesQueryKey = (options: Options) => createQueryKey("complexTypes", options); export const complexTypesOptions = (options: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -663,7 +663,7 @@ export const complexTypesOptions = (options: Options) => query queryKey: complexTypesQueryKey(options) }); -export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); +export const multipartResponseQueryKey = (options?: Options) => createQueryKey("multipartResponse", options); export const multipartResponseOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts index 543052e8b..ffb75dcd0 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/name-builder/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooD = (options?: Options) => createQueryKey('getFoo', options); +export const getFooD = (options?: Options) => createQueryKey("getFoo", options); export const getFooE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -84,7 +84,7 @@ export const fooPutC = (options?: Partial>): UseMutationOpti return mutationOptions; }; -export const getFooBarD = (options?: Options) => createQueryKey('getFooBar', options); +export const getFooBarD = (options?: Options) => createQueryKey("getFooBar", options); export const getFooBarE = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts index d20e46d8a..cba06ee5b 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/angular-query-experimental.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -61,7 +61,7 @@ export const getFooOptions = (options?: Options) => queryOptions) => createQueryKey('getBar', options); +export const getBarQueryKey = (options?: Options) => createQueryKey("getBar", options); export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts index cd17c0021..50907f758 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/react-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -61,7 +61,7 @@ export const getFooOptions = (options?: Options) => queryOptions) => createQueryKey('getBar', options); +export const getBarQueryKey = (options?: Options) => createQueryKey("getBar", options); export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts index b5226aa6f..46578d934 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/solid-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -61,7 +61,7 @@ export const getFooOptions = (options?: Options) => queryOptions) => createQueryKey('getBar', options); +export const getBarQueryKey = (options?: Options) => createQueryKey("getBar", options); export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts index 59cd68e62..547ff7d5e 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/svelte-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -61,7 +61,7 @@ export const getFooOptions = (options?: Options) => queryOptions) => createQueryKey('getBar', options); +export const getBarQueryKey = (options?: Options) => createQueryKey("getBar", options); export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts index 3eeda1911..192793d58 100644 --- a/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts-tests/main/test/__snapshots__/plugins/@tanstack/meta/@tanstack/vue-query.gen.ts @@ -41,7 +41,7 @@ const createQueryKey = (id: string, options?: TOptions ]; }; -export const getFooQueryKey = (options?: Options) => createQueryKey('getFoo', options); +export const getFooQueryKey = (options?: Options) => createQueryKey("getFoo", options); export const getFooOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { @@ -61,7 +61,7 @@ export const getFooOptions = (options?: Options) => queryOptions) => createQueryKey('getBar', options); +export const getBarQueryKey = (options?: Options) => createQueryKey("getBar", options); export const getBarOptions = (options?: Options) => queryOptions>({ queryFn: async ({ queryKey, signal }) => { diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts index 6d2e52005..df25ddd2c 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts @@ -1,10 +1,12 @@ import type { Symbol } from '@hey-api/codegen-core'; -import type { Expression } from 'typescript'; +import type ts from 'typescript'; import { hasOperationDataRequired } from '~/ir/operation'; import type { IR } from '~/ir/types'; import { buildName } from '~/openApi/shared/utils/name'; import { getClientBaseUrlKey } from '~/plugins/@hey-api/client-core/utils'; +import type { TsDsl } from '~/ts-dsl'; +import { $ } from '~/ts-dsl'; import { type Property, tsc } from '~/tsc'; import { useTypeData } from './shared/useType'; @@ -267,29 +269,21 @@ const createQueryKeyLiteral = ({ const config = isInfinite ? plugin.config.infiniteQueryKeys : plugin.config.queryKeys; - let tagsExpression: Expression | undefined; + let tagsArray: TsDsl | undefined; if (config.tags && operation.tags && operation.tags.length > 0) { - tagsExpression = tsc.arrayLiteralExpression({ - elements: operation.tags.map((tag) => tsc.stringLiteral({ text: tag })), - }); + tagsArray = $.array().items(...operation.tags); } - const symbolCreateQueryKey = plugin.referenceSymbol({ category: 'utility', resource: 'createQueryKey', tool: plugin.name, }); - const createQueryKeyCallExpression = tsc.callExpression({ - functionName: symbolCreateQueryKey.placeholder, - parameters: [ - tsc.ots.string(id), - 'options', - isInfinite || tagsExpression - ? tsc.ots.boolean(Boolean(isInfinite)) - : undefined, - tagsExpression, - ], - }); + const createQueryKeyCallExpression = $(symbolCreateQueryKey.placeholder).call( + $.literal(id), + 'options', + isInfinite || tagsArray ? $.literal(Boolean(isInfinite)) : undefined, + tagsArray, + ); return createQueryKeyCallExpression; }; @@ -370,25 +364,22 @@ export const queryKeyStatement = ({ typeQueryKey?: string; }) => { const typeData = useTypeData({ operation, plugin }); - const statement = tsc.constVariable({ - exportConst: symbol.exported, - expression: tsc.arrowFunction({ - parameters: [ - { - isRequired: hasOperationDataRequired(operation), - name: 'options', - type: typeData, - }, - ], - returnType: isInfinite ? typeQueryKey : undefined, - statements: createQueryKeyLiteral({ - id: operation.id, - isInfinite, - operation, - plugin, - }), - }), - name: symbol.placeholder, - }); + const statement = $.const(symbol.placeholder) + .export(symbol.exported) + .assign( + $.func() + .param('options', (p) => + p.optional(!hasOperationDataRequired(operation)).type(typeData), + ) + .$if(isInfinite && typeQueryKey, (f, v) => f.returns(v)) + .do( + createQueryKeyLiteral({ + id: operation.id, + isInfinite, + operation, + plugin, + }).return(), + ), + ); return statement; }; diff --git a/packages/openapi-ts/src/ts-dsl/array.ts b/packages/openapi-ts/src/ts-dsl/array.ts new file mode 100644 index 000000000..544d197ed --- /dev/null +++ b/packages/openapi-ts/src/ts-dsl/array.ts @@ -0,0 +1,31 @@ +import ts from 'typescript'; + +import { TsDsl } from './base'; +import { LiteralTsDsl } from './literal'; + +export class ArrayTsDsl extends TsDsl { + private elements: Array> = + []; + + /** Adds one or more elements to the array expression. */ + items( + ...exprs: ReadonlyArray> + ): this { + this.elements.push(...exprs); + return this; + } + + $render(): ts.ArrayLiteralExpression { + const elements = this.elements.map((element) => { + if ( + typeof element === 'string' || + typeof element === 'number' || + typeof element === 'boolean' + ) { + return this.$node(new LiteralTsDsl(element)); + } + return this.$node(element); + }); + return ts.factory.createArrayLiteralExpression(elements, false); + } +} diff --git a/packages/openapi-ts/src/ts-dsl/call.ts b/packages/openapi-ts/src/ts-dsl/call.ts index 3f574fb13..a47e079cc 100644 --- a/packages/openapi-ts/src/ts-dsl/call.ts +++ b/packages/openapi-ts/src/ts-dsl/call.ts @@ -13,11 +13,13 @@ export class CallTsDsl extends TsDsl { constructor( callee: MaybeTsDsl, - ...args: ReadonlyArray> + ...args: ReadonlyArray | undefined> ) { super(); this._callee = callee; - this.args(...args); + this.args( + ...args.filter((a): a is NonNullable => a !== undefined), + ); } $render(): ts.CallExpression { diff --git a/packages/openapi-ts/src/ts-dsl/index.ts b/packages/openapi-ts/src/ts-dsl/index.ts index 473c5d774..7c2d02d7d 100644 --- a/packages/openapi-ts/src/ts-dsl/index.ts +++ b/packages/openapi-ts/src/ts-dsl/index.ts @@ -1,3 +1,4 @@ +import { ArrayTsDsl } from './array'; import { AttrTsDsl } from './attr'; import { AwaitTsDsl } from './await'; import { BinaryTsDsl } from './binary'; @@ -30,6 +31,10 @@ import { TypeObjectTsDsl } from './type/object'; import { VarTsDsl } from './var'; const base = { + /** Creates an array literal expression (e.g. `[1, 2, 3]`). */ + array: (...args: ConstructorParameters) => + new ArrayTsDsl(...args), + /** Creates a property access expression (e.g. `obj.foo`). */ attr: (...args: ConstructorParameters) => new AttrTsDsl(...args), diff --git a/packages/openapi-ts/src/ts-dsl/mixins/access.ts b/packages/openapi-ts/src/ts-dsl/mixins/access.ts index 84dbdaf5c..c52fd2d6a 100644 --- a/packages/openapi-ts/src/ts-dsl/mixins/access.ts +++ b/packages/openapi-ts/src/ts-dsl/mixins/access.ts @@ -32,7 +32,7 @@ export function registerLazyAccessAwaitFactory(factory: AwaitFactory): void { type CallFactory = ( expr: MaybeTsDsl, - args: ReadonlyArray>, + args: ReadonlyArray | undefined>, ) => CallTsDsl; let callFactory: CallFactory | undefined; /** Registers the Call DSL factory after its module has finished evaluating. */ @@ -64,7 +64,7 @@ export class AccessMixin { /** Calls the current expression (e.g. `fn(arg1, arg2)`). */ call( this: MaybeTsDsl, - ...args: ReadonlyArray> + ...args: ReadonlyArray | undefined> ): CallTsDsl { return callFactory!(this, args); }