-
Notifications
You must be signed in to change notification settings - Fork 474
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
Traverson cannot follow multiple links with same rel #768
Comments
Intriguing problem. What would you propose as the how the API should look to handle this? |
There are discussions over at traverson/traverson-hal#7, but the feature hasn't fully landed in traverson just yet. I would suggest an API that leverages
The tricky part is if an intermediate link in the traversal chain is plural, as this means the traversal process needs to be recursive in able to resume traversal at an earlier stage after completing one path. This could for instance be indicated using |
Frankly I don’t grok a relationship with multiple links. How do you present that to the user? Multiple rels, I get. But not the other way around. |
I guess one could have a button/link that tries the first and if that fails tries the next. |
What we're trying to express is in fact multiple links, to different resources, of the same relation. The data in the example above attempts to express next of kin, in this concrete example parents, but it does not have to be parents in the traditional interpretation. In a modern world, parents are no longer exactly two individuals of opposite gender, hence the requirement for a more general way of expressing relationships. Quoting from http://stateless.co/hal_specification.html:
|
Okay I’ve seen recent hypermedia showing multiple links tied to one link relation. Sounds like Traverson would need a strategy like FIRST, RANDOM, FAILOVER, ??? What do you think? |
Problem has been redesigned for immutability. Extensions to the payload body are now implemented by wrapping a either an object exposing the properties to add in turn or a plain Map. Added infrastructure configuration to make sure that Problem instances returned from controller methods (even if wrapped into a ResponseEntity<?>) cause the ContentType header to be set to application/problem+json. HyperMediaMappingInformation now allows to customize the root domain type to signal serialization support for. Few cleanups regarding the ObjectMapper setup in test cases.
Similar to traverson/traverson#7,
TraversalBuilder
cannot follow multiple links from a resource having the samerel
value:The text was updated successfully, but these errors were encountered: