Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate resource in response document. #95

Open
beauby opened this issue Dec 12, 2016 · 1 comment
Open

Duplicate resource in response document. #95

beauby opened this issue Dec 12, 2016 · 1 comment

Comments

@beauby
Copy link

beauby commented Dec 12, 2016

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.

@fotinakis
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants