We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi. According to spec http://jsonapi.org/format/#content-negotiation Content Negotiation part, I must use application/vnd.api+json.
application/vnd.api+json
If I do:
content_type :jsonapi, "application/vnd.api+json" formatter :jsonapi, -> (object, _env) { Oj.dump(object) }
It return 406 cause try to use json. I found 3409da5 where vendor part drops. Is there any reason to do this?
json
From my point of view formatter should only format data, but it also overwrite content type but it is here.
Current implementation https://github.com/ruby-grape/grape/blob/master/lib/grape/middleware/formatter.rb#L170 & https://github.com/ruby-grape/grape/blob/master/lib/grape/middleware/formatter.rb#L122
Do I miss something?
The text was updated successfully, but these errors were encountered:
You need to tell Grape which format to use, so format :jsonapi I think will do it?
format :jsonapi
Sorry, something went wrong.
Bring it up to the mailing list if you're still having problems, I'll close this here.
No branches or pull requests
Hi. According to spec http://jsonapi.org/format/#content-negotiation Content Negotiation part, I must use
application/vnd.api+json
.If I do:
It return 406 cause try to use
json
. I found 3409da5 where vendor part drops. Is there any reason to do this?From my point of view formatter should only format data, but it also overwrite content type but it is here.
Current implementation https://github.com/ruby-grape/grape/blob/master/lib/grape/middleware/formatter.rb#L170 & https://github.com/ruby-grape/grape/blob/master/lib/grape/middleware/formatter.rb#L122
Do I miss something?
The text was updated successfully, but these errors were encountered: