Bug description
ArrayStyle does not include 'deepObject' in any client bundle, which causes a TypeScript compile error when the generated sdk.gen.ts uses deepObject style for array query parameters.
Error
error TS2322: Type '{ parameters: { products: { array: { style: "deepObject"; }; }; }; }' is not assignable to type 'QuerySerializerOptions | QuerySerializer | undefined'.
Types of property 'parameters' are incompatible.
Type '{ products: { array: { style: "deepObject"; }; }; }' is not assignable to type 'Record<string, QuerySerializerOptionsObject>'.
Property 'products' is incompatible with index signature.
Type '{ array: { style: "deepObject"; }; }' is not assignable to type 'QuerySerializerOptionsObject'.
The types of 'array.style' are incompatible between these types.
Type '"deepObject"' is not assignable to type 'ArrayStyle | undefined'.
Root cause
ArrayStyle is defined as 'form' | 'spaceDelimited' | 'pipeDelimited' in every client bundle:
packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/pathSerializer.ts (shared by fetch/axios/ky/ofetch)
packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.ts
packages/openapi-ts/src/plugins/@hey-api/client-next/bundle/utils.ts
packages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/utils.ts
packages/custom-client/src/core/pathSerializer.ts
When an OpenAPI spec uses style: deepObject on an array parameter, the generator correctly emits style: 'deepObject' in sdk.gen.ts, but the type doesn't allow it — causing a TypeScript compile error in the generated output.
Fix
Add 'deepObject' to ArrayStyle in all client bundles:
type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
The generator already produces the correct output. Users who need bracket notation serialisation (products[0]=...) can provide a custom querySerializer.
PR
#3818
Bug description
ArrayStyledoes not include'deepObject'in any client bundle, which causes a TypeScript compile error when the generatedsdk.gen.tsusesdeepObjectstyle for array query parameters.Error
Root cause
ArrayStyleis defined as'form' | 'spaceDelimited' | 'pipeDelimited'in every client bundle:packages/openapi-ts/src/plugins/@hey-api/client-core/bundle/pathSerializer.ts(shared by fetch/axios/ky/ofetch)packages/openapi-ts/src/plugins/@hey-api/client-nuxt/bundle/types.tspackages/openapi-ts/src/plugins/@hey-api/client-next/bundle/utils.tspackages/openapi-ts/src/plugins/@hey-api/client-angular/bundle/utils.tspackages/custom-client/src/core/pathSerializer.tsWhen an OpenAPI spec uses
style: deepObjecton an array parameter, the generator correctly emitsstyle: 'deepObject'insdk.gen.ts, but the type doesn't allow it — causing a TypeScript compile error in the generated output.Fix
Add
'deepObject'toArrayStylein all client bundles:The generator already produces the correct output. Users who need bracket notation serialisation (
products[0]=...) can provide a customquerySerializer.PR
#3818