Skip to content

v3.1.2: Clarify how to describe no response content #4611

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: v3.1-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

Fixes #3536.

We decided that the lack of content doesn't guarantee a lack of response content, but that noting a Content-Length of 0 does. @karenetheridge pointed out that we can set the Content-Length header to clarify this.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

We decided that the lack of `content` doesn't guarantee a lack
of response content, but that noting a `Content-Length` of `0`
does.
@handrews handrews requested review from a team as code owners May 18, 2025 02:09
@handrews
Copy link
Member Author

I'm a little uncertain on this because the HTTP spec is very squirrelly around Content-Length, but it seems to be the best way to set expectations given the current options.

@handrews handrews changed the title v3.1: Clarify how to describe no content v3.1.2: Clarify how to describe no content May 18, 2025
@handrews handrews changed the title v3.1.2: Clarify how to describe no content v3.1.2: Clarify how to describe no response content May 19, 2025
@@ -2079,7 +2079,7 @@ headers:
type: integer
```

Response with no return value:
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:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"no return value" is not very clear (some might say a response's "return value" is its HTTP response code) -- we should say "with no message body", or perhaps "zero length response body".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@karenetheridge good catch- let me think on how to frame this more clearly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants