Skip to content

Commit 7fd6f6f

Browse files
authored
feat: remove override.fetch.explode option (BREAKING CHANGE) (#2481)
* feat: remove `override.fetch.explode` option (BREAKING CHANGE) * docs: remove override.fetch.explode documentation
1 parent 7b00a64 commit 7fd6f6f

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

docs/src/pages/reference/configuration/output.mdx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,15 +1063,6 @@ Default: `true`
10631063
When using `fetch` for `client` or `httpClient`, the Fetch response type includes HTTP status for easier processing by the application.
10641064
To return a defined return type instead of an automatically generated return type, set this value to `false`.
10651065

1066-
#### explode
1067-
1068-
Type: `Boolean`.
1069-
Default: `true`
1070-
1071-
By default, the Fetch client follows the OpenAPI specification for query parameter explode behavior. This means that query parameters will be exploded unless explicitly set to `false` in the OpenAPI schema.
1072-
1073-
To maintain backward compatibility with the previous behavior (where only parameters with `explode: true` are exploded), set this value to `false`.
1074-
10751066
##### forceSuccessResponse
10761067

10771068
Type: `Boolean`.

packages/core/src/types.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -629,14 +629,12 @@ export type SwrOptions = {
629629
export type NormalizedFetchOptions = {
630630
includeHttpResponseReturnType: boolean;
631631
forceSuccessResponse: boolean;
632-
explode: boolean;
633632
jsonReviver?: Mutator;
634633
};
635634

636635
export type FetchOptions = {
637636
includeHttpResponseReturnType?: boolean;
638637
forceSuccessResponse?: boolean;
639-
explode?: boolean;
640638
jsonReviver?: Mutator;
641639
};
642640

packages/fetch/src/index.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ export const generateRequestFunction = (
6565
const schemaObject = schema.schema as SchemaObject;
6666

6767
return (
68-
schema.in === 'query' &&
69-
schemaObject.type === 'array' &&
70-
(schema.explode || override.fetch.explode)
68+
schema.in === 'query' && schemaObject.type === 'array' && schema.explode
7169
);
7270
});
7371

packages/orval/src/utils/options.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,6 @@ export const normalizeOptions = async (
354354
true,
355355
forceSuccessResponse:
356356
outputOptions.override?.fetch?.forceSuccessResponse ?? false,
357-
explode: outputOptions.override?.fetch?.explode ?? true,
358357
...outputOptions.override?.fetch,
359358
},
360359
useDates: outputOptions.override?.useDates || false,

0 commit comments

Comments
 (0)