Closed gr0uch closed 9 years ago
This would be nice, I'm currently getting Assertion failed: No model was found for 'link'
errors for the following json:
http://restpack-serializer-sample.herokuapp.com/api/v1/albums.json?includes=artists,songs
I'm not that familiar with Ember Data adapters. Is there much involved in adding support for this? Do you know of any other adapter that does support something similar?
Ah, a temporary fix I can implement is to omit the top-level meta
and links
objects. But to actually solve this, I will have to keep a record of paths to resources, and override the buildURL
and pathForType
methods. I'm not aware of any other JSON API adapters for Ember. I am currently unemployed so I will get to it soon enough.
Thanks. I'm exploring the ember data internals and I'll contribute where I can when I'm up to speed
I've added preliminary support for this. The caveat is that each model type can only have one route associated with it for now, so if you're trying to get artists by album or artists by song, it won't work as expected.
@daliwali Is this issue still relevant or can I close it? I'm doing some cleaning.
OK to close.
This should enable an API client to not worry about hard-coding resource paths, and also add the possibility to extract extra information from the top-level "meta" object.