I currently run a server that serves data like this:
single entity
{"id":"11","name":"hello",....}
list of entities
[{single entity format},{},...]
However, Ember Data expects data to follow the JSON API spec, in the format of
{"entity":{"id":"11","name":"hello",....}} OR {"entities":[{},{},{}...]}
or else it will return error:
Your server returned a hash with the key 0 but you have no mapping for it
I currently have a responseFactory
which will build the response as a map with key being the ember model ("users"/"user") the entity/list and value being the list/entity itself
Is there a better/cleaner way?