You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ **Breaking**: change default querySerializer behavior to produce `style: form`, `explode: true` query params [according to the OpenAPI specification]((https://swagger.io/docs/specification/serialization/#query). Also adds support for `deepObject`s (square bracket style).
Copy file name to clipboardExpand all lines: docs/src/content/docs/openapi-fetch/api.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ client.get("/my-url", options);
39
39
40
40
### querySerializer
41
41
42
-
This library uses <ahref="https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams"target="_blank"rel="noopener noreferrer">URLSearchParams</a> to <ahref="https://swagger.io/docs/specification/serialization/"target="_blank"rel="noopener noreferrer">serialize query parameters</a>. For complex query param types (e.g. arrays) you’ll need to provide your own `querySerializer()`method that transforms query params into a URL-safe string:
42
+
By default, this library serializes query parameters using `style: form` and `explode: true`[according to the OpenAPI specification](https://swagger.io/docs/specification/serialization/#query). To change the default behavior, you can supply your own `querySerializer()` function either on the root `createClient()`as well as optionally on an individual request. This is useful if your backend expects modifications like the addition of `[]` for array params:
0 commit comments