-
Notifications
You must be signed in to change notification settings - Fork 14
Link set profile #180
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
Draft
termontwouter
wants to merge
7
commits into
w3c:main
Choose a base branch
from
termontwouter:patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Link set profile #180
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e41dcf7
nitpicks about linkset metadata
termontwouter 99d247d
add profile parameter to create responses
termontwouter d23ed65
add profile parameter to read responses
termontwouter 8517d62
fix typo
termontwouter ad3928c
add profile parameter to update types
termontwouter 5631f20
add profile param to pagination examples
termontwouter 286c4a9
add motivation for profile parameter
termontwouter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Adding a
profile="..."shifts the problem rather than resolves it. The earlier concern was that an LWS server could not store a DataResource with media typeapplication/linkset+json, but by adding a profile, it means that an LWS server cannot store a DataResoruce with a media type ofapplication/linkset+json; profile="...". And that is true of any arbitrary profile string.One way around this would involve using Prefer headers. For example:
For a DataResource stored with media type
application/linkset+json, a client can request the linkset representation via (as an example):Prefer: return=representation; include="https://www.w3.org/ns/lws#Linkset"In this way, for the normal case of a GET request with no special headers, the response would be:
The response from a server that supports content negotiation via Prefer headers would be:
which would be sufficient to know that the response is the linkset and not the data resource.
This approach would require the addition of a vocabulary term (e.g.
https://www.w3.org/ns/lws#Linkset). An alternative terms may be preferred.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.
That depends on how we define the profile, i.m.o... Since we would define the profile ourselves, we can include in its meaning that it is a server-managed resource/representation. Then there is no semantically valid reason why someone would to store a data resource of that type.
The
Preferheader is an option I suggested earlier, and indeed avoids your issue as well. However, contrary to theprofileparameter, there is afaik no standardized way to indicate in arel=linksetlink that the link set should be requested with such a header.Uh oh!
There was an error while loading. Please reload this page.
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.
I could live with this PR (I agree that we could decide that this particular profile is "reserved" for LWS's auxiliary resources).
However, I share @acoburn's concern (which echoes the concerns I expressed on #165) that content-type is not the right place to negotiate between the primary resource from the auxiliary resource.
If we want to provide such a feature, I would suggest something like
Agreed, my proposal above would need to be registered in IANA's Preference Registry.