Skip to content

Commit eb642cb

Browse files
committed
Clarify no-content responses.
We decided that the lack of `content` doesn't guarantee a lack of response content, but that noting a `Content-Length` of `0` does.
1 parent 80f5126 commit eb642cb

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/oas.md

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

2082-
Response with no return value:
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):
20832083

20842084
```json
20852085
{
20862086
"description": "object created"
2087+
"headers": {
2088+
"Content-Length": {
2089+
"schema": {
2090+
"const": 0
2091+
}
2092+
}
2093+
}
20872094
}
20882095
```
20892096

20902097
```yaml
20912098
description: object created
2099+
headers:
2100+
Content-Length:
2101+
schema:
2102+
const: 0
20922103
```
20932104

20942105
#### Callback Object

0 commit comments

Comments
 (0)