-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle application/x-www-form-urlencoded content in request body
- Loading branch information
Showing
49 changed files
with
584 additions
and
159 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,6 @@ | ||
--- | ||
'@hey-api/client-fetch': patch | ||
'@hey-api/openapi-ts': patch | ||
--- | ||
|
||
fix: handle application/x-www-form-urlencoded content in request body |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
export { client, createClient } from '../'; | ||
export type { Client, Options, RequestResult } from '../types'; | ||
export { formDataBodySerializer, jsonBodySerializer } from '../utils'; | ||
export { | ||
formDataBodySerializer, | ||
jsonBodySerializer, | ||
urlSearchParamsBodySerializer, | ||
} from '../utils'; |
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
21 changes: 14 additions & 7 deletions
21
packages/openapi-ts/src/templates/core/ApiRequestOptions.hbs
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
export type ApiRequestOptions<T = unknown> = { | ||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; | ||
readonly url: string; | ||
readonly path?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly cookies?: Record<string, unknown>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly formData?: Record<string, unknown> | Record<string, unknown>[]; | ||
readonly headers?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly formData?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly mediaType?: string; | ||
readonly method: | ||
| 'DELETE' | ||
| 'GET' | ||
| 'HEAD' | ||
| 'OPTIONS' | ||
| 'PATCH' | ||
| 'POST' | ||
| 'PUT'; | ||
readonly path?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly responseHeader?: string; | ||
readonly responseTransformer?: (data: unknown) => Promise<T>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly url: string; | ||
}; |
21 changes: 14 additions & 7 deletions
21
packages/openapi-ts/test/__snapshots__/test/generated/v2/core/ApiRequestOptions.ts.snap
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
export type ApiRequestOptions<T = unknown> = { | ||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; | ||
readonly url: string; | ||
readonly path?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly cookies?: Record<string, unknown>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly formData?: Record<string, unknown> | Record<string, unknown>[]; | ||
readonly headers?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly formData?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly mediaType?: string; | ||
readonly method: | ||
| 'DELETE' | ||
| 'GET' | ||
| 'HEAD' | ||
| 'OPTIONS' | ||
| 'PATCH' | ||
| 'POST' | ||
| 'PUT'; | ||
readonly path?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly responseHeader?: string; | ||
readonly responseTransformer?: (data: unknown) => Promise<T>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly url: string; | ||
}; |
21 changes: 14 additions & 7 deletions
21
packages/openapi-ts/test/__snapshots__/test/generated/v3/core/ApiRequestOptions.ts.snap
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
export type ApiRequestOptions<T = unknown> = { | ||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; | ||
readonly url: string; | ||
readonly path?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly cookies?: Record<string, unknown>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly formData?: Record<string, unknown> | Record<string, unknown>[]; | ||
readonly headers?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly formData?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly mediaType?: string; | ||
readonly method: | ||
| 'DELETE' | ||
| 'GET' | ||
| 'HEAD' | ||
| 'OPTIONS' | ||
| 'PATCH' | ||
| 'POST' | ||
| 'PUT'; | ||
readonly path?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly responseHeader?: string; | ||
readonly responseTransformer?: (data: unknown) => Promise<T>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly url: string; | ||
}; |
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
21 changes: 14 additions & 7 deletions
21
...es/openapi-ts/test/__snapshots__/test/generated/v3_angular/core/ApiRequestOptions.ts.snap
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 |
---|---|---|
@@ -1,14 +1,21 @@ | ||
export type ApiRequestOptions<T = unknown> = { | ||
readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH'; | ||
readonly url: string; | ||
readonly path?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly cookies?: Record<string, unknown>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly formData?: Record<string, unknown> | Record<string, unknown>[]; | ||
readonly headers?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly formData?: Record<string, unknown>; | ||
readonly body?: any; | ||
readonly mediaType?: string; | ||
readonly method: | ||
| 'DELETE' | ||
| 'GET' | ||
| 'HEAD' | ||
| 'OPTIONS' | ||
| 'PATCH' | ||
| 'POST' | ||
| 'PUT'; | ||
readonly path?: Record<string, unknown>; | ||
readonly query?: Record<string, unknown>; | ||
readonly responseHeader?: string; | ||
readonly responseTransformer?: (data: unknown) => Promise<T>; | ||
readonly errors?: Record<number | string, string>; | ||
readonly url: string; | ||
}; |
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
Oops, something went wrong.