Skip to content

Commit a4648e6

Browse files
committed
fix: default request body to required if specified
1 parent 2e6e68c commit a4648e6

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

lib/request-body.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ export class RequestBody extends Construct {
1515

1616
constructor(scope: Construct, id: string, options: RequestBodyOptions) {
1717
super(scope, id);
18-
this.options = options;
18+
this.options = {
19+
required: true,
20+
...options,
21+
};
1922

2023
this.content =
2124
options.content instanceof MediaType

0 commit comments

Comments
 (0)