-
Notifications
You must be signed in to change notification settings - Fork 889
Clarify top-level links #262
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
Conversation
Addresses #250
A top-level `"links"` object **MAY** be used to specify URL templates that can | ||
be used to formulate URLs for resources according to their type. | ||
A top-level `"links"` object **MAY** be used to specify URL templates that can be | ||
used to formulate URLs for resources. This often allows API responses to be more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I removed the phrase "according to their type" because it's incorrect—the templates are according to path—and added the next sentence to state the impetus for templates upfront.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about "resource representations" instead of "API responses"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Trying to give an algorithm was out of the character of the spec, which doesn't give precise algorithms anywhere else. And it just made the description super messy (without even being fully specific enough to really implement directly as written.)
Hey @dgeb, Sorry it took me a bit to get back to this. I've updated my PR based on your feedback. |
|
||
Each value in the `"links"` object may either be a string or an object. If a value is | ||
a string, that string represents a URL template. If the value is an object, it must have | ||
either an `"href"` key, a `"type"`key, or both; the `"href"` key holds a URL template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs a space to break this up: "type"
key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed!
@ethanresnick thanks for updating this. I'm now 👍 on these changes, which really explain the top-level @steveklabnik @wycats what do you guys think? |
@dgeb Great! |
Related to #276 - we may want to reach a consensus on |
Thanks for your efforts here, @ethanresnick. Ultimately we ended up simplifying top-level links a great deal in #341. |
Addresses #250.