scoutforpets / jsonapi-mapper

JSON API-Compliant Serialization for your Node ORM
The Unlicense
42 stars 24 forks source link

including deeply nested resources doesn't work #16

Closed jamesdixon closed 8 years ago

jamesdixon commented 8 years ago

When attempting to include a deeply nested resource, only the top-level resource is actually returned. For example, imagine you have an appointment. That appointment has a customer and that customer has one or more pet(s). In order to return that appointment along with the customer and the pet(s), you'd request the following url:

/appointments?include=customer.pets, which would return customer data as well as any related pet(s).

Currently, the addon will only return the top-level relation (customer).

See the spec here: http://jsonapi.org/format/#fetching-includes