Skip to content

Commit 23517a2

Browse files
authored
Add RequestBodyJSON helper (#1458)
1 parent 9c67b23 commit 23517a2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.changeset/nine-pigs-reply.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"openapi-typescript-helpers": patch
3+
---
4+
5+
Add RequestBodyJSON helper

packages/openapi-typescript-helpers/index.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ export type SuccessResponseJSON<PathMethod> = JSONLike<
7878
export type ErrorResponseJSON<PathMethod> = JSONLike<
7979
ErrorResponse<ResponseObjectMap<PathMethod>>
8080
>;
81+
/** Return JSON-like request body from a path + HTTP method */
82+
export type RequestBodyJSON<PathMethod> = JSONLike<
83+
ResponseContent<OperationRequestBody<PathMethod>>
84+
>;
8185

8286
// Generic TS utils
8387

0 commit comments

Comments
 (0)