You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically jsonapi-resources switched from the before_action to manually calling the header verification method(s). But jsonapi-utils does not do that at the moment, which violates the spec.
This can be verified easily by applying this diff:
diff --git a/spec/support/shared/jsonapi_request.rb b/spec/support/shared/jsonapi_request.rb
index 052ff89..0bc33c8 100644
--- a/spec/support/shared/jsonapi_request.rb+++ b/spec/support/shared/jsonapi_request.rb@@ -1,7 +1,7 @@
shared_context 'JSON API headers' do
let(:headers) do
- { 'Accept' => 'application/vnd.api+json',- 'Content-Type' => 'application/vnd.api+json' }+ { 'Accept' => 'application/json',+ 'Content-Type' => 'application/json' }
end
before(:each) { request.headers.merge!(headers) }
And running the specs, which should not pass.
I wanted to provide a patch for this but honestly I'm not sure how to proceed. Any suggestions @tiagopog?
The text was updated successfully, but these errors were encountered:
The issue was introduced in this commit: cerebris/jsonapi-resources@05f873c
Basically jsonapi-resources switched from the
before_action
to manually calling the header verification method(s). But jsonapi-utils does not do that at the moment, which violates the spec.This can be verified easily by applying this diff:
And running the specs, which should not pass.
I wanted to provide a patch for this but honestly I'm not sure how to proceed. Any suggestions @tiagopog?
The text was updated successfully, but these errors were encountered: