Skip to content

Commit 70274dc

Browse files
committed
Clarify that Request Body Objects need a body
We require `content` but failed to require it to be non-empty, even though a request body without a body does not make any sense.
1 parent 80f5126 commit 70274dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/oas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ Describes a single request body.
14041404
| Field Name | Type | Description |
14051405
| ---- | :----: | ---- |
14061406
| <a name="request-body-description"></a>description | `string` | A brief description of the request body. This could contain examples of use. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
1407-
| <a name="request-body-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
1407+
| <a name="request-body-content"></a>content | Map[`string`, [Media Type Object](#media-type-object)] | **REQUIRED**. The content of the request body. The key is a media type or [media type range](https://tools.ietf.org/html/rfc7231#appendix-D) and the value describes it. The map SHOULD Have at least one entry; if it does not, the behavior is implementation-defined. For requests that match multiple keys, only the most specific key is applicable. e.g. `"text/plain"` overrides `"text/*"` |
14081408
| <a name="request-body-required"></a>required | `boolean` | Determines if the request body is required in the request. Defaults to `false`. |
14091409

14101410
This object MAY be extended with [Specification Extensions](#specification-extensions).

0 commit comments

Comments
 (0)