-
Notifications
You must be signed in to change notification settings - Fork 138
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
#links - representing an array of one link as just the link #61
Comments
Isn't it dangerous to change the representation format of your links depending on the amount? My idea was: By using either |
Yes exactly as nick says, it is a better idea to pick an array or single object up front as you would with any normal Jason property. |
Autocomplete fail. |
Gotcha, I misunderstood the intent from other conversations. Closing it! |
Who's Jason? |
:)
|
This is a nice to have, as the implementation is HAL compliant at the moment.
For an array of links, the number of links may vary based on the request or the state of the resource, and ideally if only one link is necessary it would be rendered as just the link and not an array of one link.
Explained in code:
Which right now gets represented as either:
Ideally the single link should just be represented as:
In particular I'd like to see this because otherwise clients can create false expectations about how multi-link rels work, but it's very low priority to be honest.
The text was updated successfully, but these errors were encountered: