-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Versioning accept header strict/cascade settings appears to not work in this case #1082
Comments
I believe your logic is correct. Without a valid |
Okay, I created a pull request for this: #1101 At least, this seemed fairly straight forward to test and fix. It looks like if the accept header was a media type, it was failing to catch the missing version and return a 406. |
Fixed in #1101. |
If I have this config for versioning...
then this should require that I pass the appropriate
Accept
request header to get a valid200
response.This request should work:
... and it does, returning a successful
200
response.But, not passing the correct Accept header should result in an error. For example, this request:
... fails with a
406
response as expected.However, this request returns a successful
200
API response, which is unexpected:I didn't make the request with the correct version
Accept
header, but I'm getting a successful200
response. Is this a bug, or have I misunderstood how thestrict: true, cascade: false
config settings are supposed to work?The text was updated successfully, but these errors were encountered: