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
Copy file name to clipboardExpand all lines: docs/content/docs/reference/configuration/output.mdx
+48-2Lines changed: 48 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1822,6 +1822,35 @@ Custom JSON reviver function (useful for date parsing).
1822
1822
1823
1823
Enable Zod runtime validation for fetch client responses. Requires `schemas: { type: 'zod' }`. When enabled, JSON responses are validated via `Schema.parse()` before being returned.
1824
1824
1825
+
### arrayFormat
1826
+
1827
+
**Type:**`'repeat' | 'brackets' | 'comma'`
1828
+
1829
+
Controls how array query parameters are serialized when the OpenAPI spec does not explicitly set `explode` on a parameter. The spec's own `explode` property always takes precedence.
1830
+
1831
+
| Value | Output |
1832
+
|-------|--------|
1833
+
|`repeat`|`?tags=a&tags=b`|
1834
+
|`brackets`|`?tags[]=a&tags[]=b`|
1835
+
|`comma`|`?tags=a%2Cb`|
1836
+
1837
+
```ts title="orval.config.ts"
1838
+
exportdefaultdefineConfig({
1839
+
petstore: {
1840
+
output: {
1841
+
client: 'fetch',
1842
+
override: {
1843
+
fetch: {
1844
+
arrayFormat: 'repeat',
1845
+
},
1846
+
},
1847
+
},
1848
+
},
1849
+
});
1850
+
```
1851
+
1852
+
For full control over serialization (including custom encoding, nested objects, etc.) use [`override.paramsSerializer`](#paramsserializer) instead.
> **Note:**Only valid when using Axios or Angular.
2614
+
> **Note:**Valid for Axios, Angular, and the fetch client.
2586
2615
2587
-
Custom parameter serializer for query parameters:
2616
+
Custom parameter serializer for query parameters. When set, the generated URL helper delegates query string building entirely to this function instead of using the built-in logic.
For Axios and Angular the function receives the params object and can return any value Axios/Angular accepts. For the fetch client it must return a `string` (the raw query string without the leading `?`):
0 commit comments