Impossible to have a relationship on another object Twice


In, there is a limitation on relationships that prevents referencing the same object twice which is understandable.

Currently in the Drupal community, there is a JSONAPI module to provide webservices implementing the JSON API and it uses the official schema.json for validation.

Although it may be a rare case, on a Drupal content, there is basically nothing that prevents you from referencing another content twice, so in that case the JSON returned by JSON API is no more valid.

Here is the issue on that leads me to post a request here.

So what is the opinion of the JSON API maintainers about this? Would it be possible to change that in the official schema.json?

Thanks for any response.

1 Like

I agree with @flter that this feels like an unnecessary limitation.

Just to be clear I’m talking about the fact that items in a multi value relationship are required to be unique. I do believe that items in the included section should be unique.


Pull request created to highlight the request: