Skip to content

Completely leaving out the version number in Accept header versioning schemes with strict: true does not result in a 406 #1206

Closed
@suan

Description

@suan

When having an endpoint with:

version 'v1', vendor: 'foo.resource', using: header, cascade: false, strict: true
content_type :v1_resource, 'application/vnd.foo.resource-v1+json'
format :v1_resource

Any request with both "Accept: application/json" and "Accept: application/vnd.foo.resource-v1+json" headers present does not result in a 406, whereas the expected behavior is that it would be a 406, because of the strict option.

(When only the "Accept: application/vnd.foo.resource-v1+json" header is present it correctly responds with a 406)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions