When there is a relationship with a camelized name like Post.hasMany('someResource'), but the "links" object has a called 'some_resources' ED could not find the relationship (see test).
This PR camelizes the link key to make that work.
I was thinking about if this should belong somewhere else like inside ED's normalizeRelationships function, but doing it inside ember-json-api was easy and since ember-json-api already uses the convention "camel case inside the model, underscores in the JSON payload", doing this inside ember-json-api looks legit.
When there is a relationship with a camelized name like
Post.hasMany('someResource')
, but the "links" object has a called 'some_resources' ED could not find the relationship (see test). This PR camelizes the link key to make that work.I was thinking about if this should belong somewhere else like inside ED's
normalizeRelationships
function, but doing it inside ember-json-api was easy and since ember-json-api already uses the convention "camel case inside the model, underscores in the JSON payload", doing this inside ember-json-api looks legit.