-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
begin integration docs #1312
begin integration docs #1312
Conversation
…he inability to use query params on a single resource find
I think this is pretty good, but am thinking we might also benefit from an external links section oof posts/tutorials/screencasts/recipes etc. like http://emberwatch.com/tutorials.html has so we can e.g. link to, in date sorted format: -http://tech.kinesis.org/2015/11/06/a-migration-path-to-json-api-with-ember-data-from-ams/
|
@NullVoxPopuli Let's get this cleaned up and shipped! Great work, just needs some touch-ups, and maybe reference versions of AMS the integrations target, e.g.
|
I really like that compatibility table. I'll push an update shortly |
This also needs to be mentioned: |
how's it look, @bf4 ? |
) | ||
|
||
Mime::Type.unregister :json | ||
Mime::Type.register 'application/json', :json, api_mime_types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we might want something like https://github.com/cerebris/jsonapi-resources/blob/master/lib/jsonapi/mime_types.rb but I have no way of testing it right now
module JSONAPI
MEDIA_TYPE = 'application/vnd.api+json'
end
Mime::Type.register JSONAPI::MEDIA_TYPE, :api_json
ActionDispatch::ParamsParser::DEFAULT_PARSERS[Mime::Type.lookup(JSONAPI::MEDIA_TYPE)] = lambda do |body|
data = JSON.parse(body)
data = {:_json => data} unless data.is_a?(Hash)
data.with_indifferent_access
end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could certainly add that later - maybe when the JSON API implementation becomes more complete. I think that should be separate from this PR though.
Pretty good. I'm happy to merge, but wanted to bring up in one place
|
re: the links, idk. :-\ |
There are always going to be little quirks here and there when integrating with different technologies, especially newer ones.
Here is a pattern suggested by @bf4 for organizing information on how to prepare other technologies to work along with AMS.
note: this doesn't mean that these docs are only for if the integratee needs to change to work with AMS.
When AMS gets the ability to change the key format (specifically for JSON-api) that will clean up the ember-integration documentation a bit.