Skip to content

Commit eb100ec

Browse files
committed
Make the clarification more clear
1 parent eb642cb commit eb100ec

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

src/oas.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2079,11 +2079,23 @@ headers:
20792079
type: integer
20802080
```
20812081

2082-
Response with no return value (note that the `Content-Length` header is not marked as required, as some implementations might not set it at all if there is no content):
2082+
A response with no return value can be specified by omitting the `content` field, although this technically does not enforce a lack of content, it merely indicates that none is documented:
20832083

20842084
```json
20852085
{
20862086
"description": "object created"
2087+
}
2088+
```
2089+
2090+
```yaml
2091+
description: object created
2092+
```
2093+
2094+
To signal a definitive lack of content, require that the `Content-Length` header, if present, is `0` (note the HTTP specification does not always require `Content-Length`, so this usage is more to set expectations than to guarantee the header's use):
2095+
2096+
```json
2097+
{
2098+
"description": "object created",
20872099
"headers": {
20882100
"Content-Length": {
20892101
"schema": {

0 commit comments

Comments
 (0)