-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Limiting OAS3.1 to RFC7231 status codes? #2471
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
Comments
What else would it mean? You can use any status codes defined in RFC 7231. Using custom status codes is undefined and therefore undefined behavior is to be expected. Was there a particular status code you were looking to use thats not in 7231 or are you trying to use custom codes? For extra context, the JSON Schema validates the following:
So you could go using custom status codes if you wanted to, but if its outside of those rules some validators will barf errors at you. |
429 status code is rfc6585, but not in 7231 ;) I'm just saying that there are http-extensions beyond 7231 and they are standards too. |
OAS refers not only to RFC 7231 but also to the IANA registry:
RFC 7231 itself points to the IANA registry for the complete list of codes:
Maybe the intended meaning here is that the definition of "HTTP status code" is taken from RFC 7231 (i.e. it's a 3-digit integer in the 100-599 range), and for specific registered status codes the reader should refer to the IANA registry? |
@hkosova sounds good! |
@hkosova exactly, the text just need a slight rewording. Feel free to PR with your text... or I'll do it tomorrow if you don't have time. |
@ioggstream @hkosova woudl one of you like to take a go at that proposed PR? |
The httpwg is releasing the new http spec. I will create a PR next week but we could even wait for the new spec to be released so that we have the latest references. |
#2630 was merged. Thanks all. |
@MikeRalphson sorry for the delay. The PR is ok. Thanks! |
I expect
To reference all registered status codes
Instead
The spec says
Note
It is not clear to whether the current formulation limits the available status codes to the one in 7231
The text was updated successfully, but these errors were encountered: