Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions docs/src/pages/reference/configuration/output.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1003,15 +1003,6 @@ Default: `true`
When using `fetch` for `client` or `httpClient`, the Fetch response type includes HTTP status for easier processing by the application.
To return a defined return type instead of an automatically generated return type, set this value to `false`.

#### explode

Type: `Boolean`.
Default: `true`

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.

To maintain backward compatibility with the previous behavior (where only parameters with `explode: true` are exploded), set this value to `false`.

##### forceSuccessResponse

Type: `Boolean`.
Expand Down
2 changes: 0 additions & 2 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,12 @@ export type SwrOptions = {
export type NormalizedFetchOptions = {
includeHttpResponseReturnType: boolean;
forceSuccessResponse: boolean;
explode: boolean;
jsonReviver?: Mutator;
};

export type FetchOptions = {
includeHttpResponseReturnType?: boolean;
forceSuccessResponse?: boolean;
explode?: boolean;
jsonReviver?: Mutator;
};

Expand Down
4 changes: 1 addition & 3 deletions packages/fetch/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ export const generateRequestFunction = (
const schemaObject = schema.schema as SchemaObject;

return (
schema.in === 'query' &&
schemaObject.type === 'array' &&
(schema.explode || override.fetch.explode)
schema.in === 'query' && schemaObject.type === 'array' && schema.explode
);
});

Expand Down
1 change: 0 additions & 1 deletion packages/orval/src/utils/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,6 @@ export const normalizeOptions = async (
true,
forceSuccessResponse:
outputOptions.override?.fetch?.forceSuccessResponse ?? false,
explode: outputOptions.override?.fetch?.explode ?? true,
...outputOptions.override?.fetch,
},
useDates: outputOptions.override?.useDates || false,
Expand Down