jsmestad / jsonapi-consumer

Client framework for consuming JSONAPI services in Ruby
https://github.com/jsmestad/jsonapi-consumer
Apache License 2.0
94 stars 18 forks source link

Top level key must be named 'data' (+type) #11

Closed danelowe closed 9 years ago

danelowe commented 9 years ago

Refer,

http://jsonapi.org/format/#document-structure-top-level

https://github.com/json-api/json-api/pull/341/files#diff-26e38355b69056b0db1c2b1c612241b2R70

For legacy support, one could then put the following on their base resource class:

def self.json_key
  path
end
jsmestad commented 9 years ago

@danelowe how would you like to handle the JSONAPI RC2 stuff?

I think there are two solid options:

I think I prefer the former, but what are your thoughts?

danelowe commented 9 years ago

Hi @jsmestad,

I'm happy to make a start on the JSONAPI RC2 stuff. At this stage I'm only aware of the changes that directly affect what I'm using myself. I assume there's not too much more but can't make any promises on timeframe at this stage.

I prefer a branch also. By the time the behaviour fully matches against a version number for JSONAPI, there will probably be a 1.0 release of JSONAPI anyway.

jsmestad commented 9 years ago

@danelowe I pushed up a develop branch where we can pull in any JSONAPI RC changes. Can you re-do this PR?