- Issue created by @bradjones1
- last update
over 1 year ago Composer require failure - @bradjones1 opened merge request.
- Status changed to Needs review
over 1 year ago 4:45am 23 May 2023
There is logic in the normalizer to add a unique hash to any duplicate link keys because there is no provision for duplicates and JSON:API does not support arrays of links.
OK, that's fine, but I _think_ this now means that it is difficult to programmatically "infer" the link relation type from the key with a simple equality match. You'd have to do something like String.prototype.startsWith()
on the keys, which is a little weird. The link object specification already has provision for a rel
member, so let's use it in this case. Yes, it results in a bit of duplication, but not much, and it makes these links much friendlier to machine parsing.
Add the `rel` key if the link is part of a multiple-group.
Needs review
1.0
Code