I am implementing an API generator for Drupal that supports JSON API. One of the things that I am missing is the ability to provide different sparse fieldsets for items included via different relationships.
I am solving that by using dot notation in the
fields parameter. Imagine that you have a record label that can manage bands and individual artists. In turn each band can have artists as members of the band. My goal would be to be able to include the individual artists with 3 fields and band member artists with 1 field. I achieve that by doing
fields=individualArtist.field1,individualArtist.field2,individualArtist.field3,band.members.field4, instead of doing
I believe that this adds an extra pinch of flexibility.
Are there any thoughts about that?