-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1265 from hey-api/fix/parameters-explode-false
fix: handle non-exploded array query parameters
- Loading branch information
Showing
36 changed files
with
498 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@hey-api/openapi-ts': patch | ||
--- | ||
|
||
fix: handle non-exploded array query parameters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/openapi-ts/test/__snapshots__/3.0.x/parameter-explode-false/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
export * from './types.gen'; | ||
export * from './services.gen'; |
19 changes: 19 additions & 0 deletions
19
packages/openapi-ts/test/__snapshots__/3.0.x/parameter-explode-false/services.gen.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
import { createClient, createConfig, type Options } from '@hey-api/client-fetch'; | ||
import type { PostFooData } from './types.gen'; | ||
|
||
export const client = createClient(createConfig()); | ||
|
||
export const postFoo = <ThrowOnError extends boolean = false>(options?: Options<PostFooData, ThrowOnError>) => { | ||
return (options?.client ?? client).post<unknown, unknown, ThrowOnError>({ | ||
...options, | ||
url: '/foo', | ||
querySerializer: { | ||
array: { | ||
explode: false, | ||
style: 'form' | ||
} | ||
} | ||
}); | ||
}; |
9 changes: 9 additions & 0 deletions
9
packages/openapi-ts/test/__snapshots__/3.0.x/parameter-explode-false/types.gen.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// This file is auto-generated by @hey-api/openapi-ts | ||
|
||
export type PostFooData = { | ||
body?: never; | ||
path?: never; | ||
query?: { | ||
foo?: Array<string>; | ||
}; | ||
}; |
Oops, something went wrong.