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
I'm not sure if this belongs in the MIME types gem or here so if it belongs elsewhere just let me know.
The new JSON API content type is application/vnd.api+json. Which can be parsed just fine with the current parser in ParamsParser. Unfortunately when the MIME type is parsed it doesn't know to just use the default JSON parser.
The text was updated successfully, but these errors were encountered:
@jfelchner Hey, can you maybe elaborate more on this, maybe preparing some examples with expected output? I was stressing my local app with application/vnd.api+json content type and it seemed to use default JSON parser. I've also added PR with test for this.
I have a Rails 4.2.3 application which reproduces this issue: https://github.com/radar/rails-21168. If you comment out these lines in config/initializers/mime_types.rb, the test will break:
(There might be a shorter way of writing that first line, but I haven't looked too deeply into it)
So what I think needs to happen is that Rails needs to be configured to automatically JSON.parse the body if the content type is set to application/vnd.api+json. You could probably update your PR to do that, @rodzyn.
I'm not sure if this belongs in the MIME types gem or here so if it belongs elsewhere just let me know.
The new JSON API content type is
application/vnd.api+json
. Which can be parsed just fine with the current parser inParamsParser
. Unfortunately when the MIME type is parsed it doesn't know to just use the default JSON parser.The text was updated successfully, but these errors were encountered: