We at Instructure are trying to use JSON API standards in a new Ember application we are working on and we would like to use Ember Data. Our API returns associations in the “linked” key of the response. For example:
{
"linked": {
"authors": [
{
"id": "2",
"name": "ericb@instructure.com",
"avatar_url": null
}
]
},
"meta": {},
"course_templates": [
{
"id": "5",
"estimated_time": 15,
"passing_threshold": 80,
"title": "Turkey Cornsquish",
"is_published": true,
"has_unpublished_changes": false,
"default_days_until_due": 7,
"next_section_due": "2014-07-26T06:00:00.000Z",
"links": {
"author": "2"
}
}
]
}
We have an Ember Data model called CourseTemplate and it belongs to an author. When I perform the find all function of the CourseTemplate model, I get the error: Error: No model was found for 'linked'
.
Is this something that is supported in Ember Data? If not, does anyone have an example of how to handle this?