Hi
The specification is quite clear on the use of the include parameter - it clearly indicates that dot notation should be used to specify relationship paths, e.g. comments.author in the #Spec: Fetching-includes section
What the spec is not clear on how this translates to sparse fieldsets (i.e. no mention of dot notation).
For example, a contrived example
Which is more in-line with the specification, option 1 or option 2
- GET
/api/people
?fields[people]=name,createdAt
&fields[group]=name,budget
&fields[group.division]=name,address
&fields[group.division.managers]=name,telephone
&include=group,group.division,group.division.managers - GET
/api/people
?fields[people]=name,createdAt
&fields[group]=name,budget,division.name,division.address,division.managers.name,division.managers.telephone
&include=group,group.division,group.division.managers
Where a:
- A Person has a Group.
- Group has a Division
- Division has a list of Managers
Thanks
~the fool