Skip to content

Commit 86f2e0c

Browse files
committed
run test:update
1 parent d421a0a commit 86f2e0c

File tree

87 files changed

+377
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+377
-145
lines changed

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/client.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const createClient = (config: Config = {}): Client => {
8080
const { auth, ...optsWithoutAuth } = opts;
8181
const response = await _axios({
8282
...optsWithoutAuth,
83-
baseURL: opts.baseURL as string,
83+
baseURL: '', // the baseURL is already included in `url`
8484
data: getValidRequestBody(opts),
8585
headers: opts.headers as RawAxiosRequestHeaders,
8686
// let `paramsSerializer()` handle query params if it exists

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ type BuildUrlFn = <
151151
url: string;
152152
},
153153
>(
154-
options: Pick<TData, 'url'> & Omit<Options<TData>, 'axios'>,
154+
options: Pick<TData, 'url'> & Options<TData>,
155155
) => string;
156156

157157
export type Client = CoreClient<

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/axios/client/utils.gen.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,16 @@ export const setAuthParams = async ({
125125
}
126126
};
127127

128-
export const buildUrl: Client['buildUrl'] = (options) =>
129-
getUrl({
130-
baseUrl: options.baseURL as string,
128+
export const buildUrl: Client['buildUrl'] = (options) => {
129+
const instanceBaseUrl = options.axios?.defaults?.baseURL;
130+
131+
const baseUrl =
132+
!!options.baseURL && typeof options.baseURL === 'string'
133+
? options.baseURL
134+
: instanceBaseUrl;
135+
136+
return getUrl({
137+
baseUrl: baseUrl as string,
131138
path: options.path,
132139
// let `paramsSerializer()` handle query params if it exists
133140
query: !options.paramsSerializer ? options.query : undefined,
@@ -137,6 +144,7 @@ export const buildUrl: Client['buildUrl'] = (options) =>
137144
: createQuerySerializer(options.querySerializer),
138145
url: options.url,
139146
});
147+
};
140148

141149
export const mergeConfigs = (a: Config, b: Config): Config => {
142150
const config = { ...a, ...b };

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/client.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const createClient = (config: Config = {}): Client => {
8080
const { auth, ...optsWithoutAuth } = opts;
8181
const response = await _axios({
8282
...optsWithoutAuth,
83-
baseURL: opts.baseURL as string,
83+
baseURL: '', // the baseURL is already included in `url`
8484
data: getValidRequestBody(opts),
8585
headers: opts.headers as RawAxiosRequestHeaders,
8686
// let `paramsSerializer()` handle query params if it exists

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ type BuildUrlFn = <
151151
url: string;
152152
},
153153
>(
154-
options: Pick<TData, 'url'> & Omit<Options<TData>, 'axios'>,
154+
options: Pick<TData, 'url'> & Options<TData>,
155155
) => string;
156156

157157
export type Client = CoreClient<

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/axios/client/utils.gen.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,16 @@ export const setAuthParams = async ({
125125
}
126126
};
127127

128-
export const buildUrl: Client['buildUrl'] = (options) =>
129-
getUrl({
130-
baseUrl: options.baseURL as string,
128+
export const buildUrl: Client['buildUrl'] = (options) => {
129+
const instanceBaseUrl = options.axios?.defaults?.baseURL;
130+
131+
const baseUrl =
132+
!!options.baseURL && typeof options.baseURL === 'string'
133+
? options.baseURL
134+
: instanceBaseUrl;
135+
136+
return getUrl({
137+
baseUrl: baseUrl as string,
131138
path: options.path,
132139
// let `paramsSerializer()` handle query params if it exists
133140
query: !options.paramsSerializer ? options.query : undefined,
@@ -137,6 +144,7 @@ export const buildUrl: Client['buildUrl'] = (options) =>
137144
: createQuerySerializer(options.querySerializer),
138145
url: options.url,
139146
});
147+
};
140148

141149
export const mergeConfigs = (a: Config, b: Config): Config => {
142150
const config = { ...a, ...b };

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/client.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const createClient = (config: Config = {}): Client => {
8080
const { auth, ...optsWithoutAuth } = opts;
8181
const response = await _axios({
8282
...optsWithoutAuth,
83-
baseURL: opts.baseURL as string,
83+
baseURL: '', // the baseURL is already included in `url`
8484
data: getValidRequestBody(opts),
8585
headers: opts.headers as RawAxiosRequestHeaders,
8686
// let `paramsSerializer()` handle query params if it exists

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/types.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ type BuildUrlFn = <
151151
url: string;
152152
},
153153
>(
154-
options: Pick<TData, 'url'> & Omit<Options<TData>, 'axios'>,
154+
options: Pick<TData, 'url'> & Options<TData>,
155155
) => string;
156156

157157
export type Client = CoreClient<

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/solid-query/axios/client/utils.gen.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,16 @@ export const setAuthParams = async ({
125125
}
126126
};
127127

128-
export const buildUrl: Client['buildUrl'] = (options) =>
129-
getUrl({
130-
baseUrl: options.baseURL as string,
128+
export const buildUrl: Client['buildUrl'] = (options) => {
129+
const instanceBaseUrl = options.axios?.defaults?.baseURL;
130+
131+
const baseUrl =
132+
!!options.baseURL && typeof options.baseURL === 'string'
133+
? options.baseURL
134+
: instanceBaseUrl;
135+
136+
return getUrl({
137+
baseUrl: baseUrl as string,
131138
path: options.path,
132139
// let `paramsSerializer()` handle query params if it exists
133140
query: !options.paramsSerializer ? options.query : undefined,
@@ -137,6 +144,7 @@ export const buildUrl: Client['buildUrl'] = (options) =>
137144
: createQuerySerializer(options.querySerializer),
138145
url: options.url,
139146
});
147+
};
140148

141149
export const mergeConfigs = (a: Config, b: Config): Config => {
142150
const config = { ...a, ...b };

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@tanstack/svelte-query/axios/client/client.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const createClient = (config: Config = {}): Client => {
8080
const { auth, ...optsWithoutAuth } = opts;
8181
const response = await _axios({
8282
...optsWithoutAuth,
83-
baseURL: opts.baseURL as string,
83+
baseURL: '', // the baseURL is already included in `url`
8484
data: getValidRequestBody(opts),
8585
headers: opts.headers as RawAxiosRequestHeaders,
8686
// let `paramsSerializer()` handle query params if it exists

0 commit comments

Comments
 (0)