Skip to content

Commit 307ff98

Browse files
author
Jorrin
committed
feat: make tanstack query respect responseStyle
1 parent 9b9ffce commit 307ff98

264 files changed

Lines changed: 16886 additions & 202 deletions

File tree

Some content is hidden

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

packages/openapi-ts-tests/__snapshots__/plugins/@tanstack/meta/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/body-response-text-plain/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/form-data/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default-class/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ export const createClient = (config: Config = {}): Client => {
178178
}
179179

180180
if (opts.throwOnError) {
181+
if (opts.responseStyle === 'fields') {
182+
throw {
183+
error: finalError,
184+
...result,
185+
};
186+
}
181187
throw finalError;
182188
}
183189

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@angular/common/default/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,12 @@ export const createClient = (config: Config = {}): Client => {
178178
}
179179

180180
if (opts.throwOnError) {
181+
if (opts.responseStyle === 'fields') {
182+
throw {
183+
error: finalError,
184+
...result,
185+
};
186+
}
181187
throw finalError;
182188
}
183189

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes-instance/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/client-fetch/sdk-nested-classes/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/default/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/instance/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

packages/openapi-ts-tests/main/test/__snapshots__/2.0.x/plugins/@hey-api/sdk/throwOnError/client/client.gen.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,12 @@ export const createClient = (config: Config = {}): Client => {
230230
finalError = finalError || ({} as string);
231231

232232
if (opts.throwOnError) {
233+
if (opts.responseStyle === 'fields') {
234+
throw {
235+
error: finalError,
236+
...result,
237+
};
238+
}
233239
throw finalError;
234240
}
235241

0 commit comments

Comments
 (0)