I was writing a benchmark to compare AMS, jsonapi-rb and jsonapi-serializers, and came across the following bug:
When a primary resource can be reached as an included related resource, it will appear both in the primary and included sections of the response document, although the spec states that
A compound document MUST NOT include more than one resource object for each type and id pair.
Thanks for the report. This makes sense, we de-dupe everything in the included section, but not between included and primary (so if there is a circular reference back to the primary, it would be also in included).
I was writing a benchmark to compare AMS, jsonapi-rb and jsonapi-serializers, and came across the following bug:
When a primary resource can be reached as an included related resource, it will appear both in the
primary
andincluded
sections of the response document, although the spec states that