Skip to content

Commit 1d69355

Browse files
Ed Bazhenovclaude
andcommitted
fix(sdk): add 'deepObject' to ArrayStyle instead of silently falling back to 'form'
When an array query parameter has `style: deepObject` the generator was emitting `style: 'deepObject'` in sdk.gen.ts, but `ArrayStyle` in every client bundle did not include that value, causing a TypeScript compile error in the generated output. The correct fix is to add `'deepObject'` to the `ArrayStyle` union in all client bundles (client-core, client-nuxt, client-next, client-angular, custom-client). The generator now faithfully preserves the style from the spec. Users who need bracket notation serialisation (products[0]=...) can supply a custom `querySerializer`. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 66720d9 commit 1d69355

325 files changed

Lines changed: 4466 additions & 289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

examples/openapi-ts-angular-common/src/client/client/utils.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface PathSerializer {
1818

1919
const PATH_PARAM_RE = /\{[^{}]+\}/g;
2020

21-
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
21+
type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
2222
type MatrixStyle = 'label' | 'matrix' | 'simple';
2323
type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2424

examples/openapi-ts-angular-common/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-angular/src/client/client/utils.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface PathSerializer {
1818

1919
const PATH_PARAM_RE = /\{[^{}]+\}/g;
2020

21-
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
21+
type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
2222
type MatrixStyle = 'label' | 'matrix' | 'simple';
2323
type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2424

examples/openapi-ts-angular/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-axios/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-fastify/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-fetch/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-ky/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-nestjs/src/client/core/pathSerializer.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export interface SerializerOptions<T> {
1515
style: T;
1616
}
1717

18-
export type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
18+
export type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
1919
export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2020
type MatrixStyle = 'label' | 'matrix' | 'simple';
2121
export type ObjectStyle = 'form' | 'deepObject';

examples/openapi-ts-next/src/client/client/utils.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface PathSerializer {
1717

1818
const PATH_PARAM_RE = /\{[^{}]+\}/g;
1919

20-
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
20+
type ArrayStyle = 'deepObject' | 'form' | 'spaceDelimited' | 'pipeDelimited';
2121
type MatrixStyle = 'label' | 'matrix' | 'simple';
2222
type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
2323

0 commit comments

Comments
 (0)