Skip to content

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

Closed
wants to merge 5 commits into from
Closed

Clarify top-level links #262

wants to merge 5 commits into from

Conversation

ethanresnick
Copy link
Member

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
Copy link
Member Author

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.

Copy link
Member

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"?

Copy link
Member Author

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.)
@ethanresnick
Copy link
Member Author

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
Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

@dgeb
Copy link
Member

dgeb commented Sep 12, 2014

@ethanresnick thanks for updating this. I'm now 👍 on these changes, which really explain the top-level "links" object more thoroughly than before. I only commented on one tiny typo in my read-through.

@steveklabnik @wycats what do you guys think?

@ethanresnick
Copy link
Member Author

@dgeb Great!

@dgeb
Copy link
Member

dgeb commented Oct 30, 2014

Related to #276 - we may want to reach a consensus on links in general before clarifying the language.

@dgeb
Copy link
Member

dgeb commented Feb 18, 2015

Thanks for your efforts here, @ethanresnick. Ultimately we ended up simplifying top-level links a great deal in #341.

@dgeb dgeb closed this Feb 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy