nilportugues / php-json-api

JSON API transformer outputting valid (PSR-7) API Responses.
http://nilportugues.com
MIT License
71 stars 35 forks source link

Unique included data #85

Closed HennerM closed 7 years ago

HennerM commented 7 years ago

If there are objects in compound documents that have the same key and type, but the objects are not equal, the transformer would put the same resource identifier more than once into the included data. I didn't read about the "uniquness" of compund documents in the JSON API specification, but I suppose that such behaviour is not allowed.

I took the approach to merge objects with the same identifier, because I didn't got any better idea to handle this.