ietf-wg-httpapi / linkset

Media Types and a Link Relation Type for Link Sets
https://datatracker.ietf.org/doc/draft-ietf-httpapi-linkset/
7 stars 8 forks source link

Inverse links #38

Closed philarcher closed 3 years ago

philarcher commented 3 years ago

MNot's comment (https://mailarchive.ietf.org/arch/msg/httpapi/gv9uqyD8Fv96P-_ip9LWIiCqALM/) on section 4 is

"Document Formats for Sets of Links -- 'In both serializations for link sets defined here, inverse links SHOULD be represented as direct links using the "rel" construct and by switching the position of the resources involved in the link.' -- is this always true? I.e., for every link relation, is it the case that the inverse relation's semantics in total are expressed by merely reversing the subject and object? Also, this doesn't feel like a SHOULD (which is for interoperability)."

PhilA: I agree, the SHOULD here is misleading but I think that's just the way it's worded. I suggest the text can be amended easily enough. My understanding is that what is meant is "if you want to provide inverse links, just switch things around, that's fine". If I'm right, there's no need for a keyword at all, it can just be:

"Note that Section 3.3 of [RFC8288] deprecates the "rev" construct that was provided by [RFC5988] as a means to express links with a directionality that is the inverse of direct links that use the "rel" construct. In both serializations for link sets defined here, inverse links may be represented as direct links using the "rel" construct and by switching the position of the resources involved in the link.

hvdsomp commented 3 years ago

The proposal is to replace the sentence:

Note that Section 3.3 of [RFC8288] deprecates the "rev" construct that was provided by [RFC5988] as a means to express links with a directionality that is the inverse of direct links that use the "rel" construct. In both serializations for link sets defined here, inverse links SHOULD be represented as direct links using the "rel" construct and by switching the position of the resources involved in the link.

by the one suggested by @philarcher:

Note that Section 3.3 of [RFC8288] deprecates the "rev" construct that was provided by [RFC5988] as a means to express links with a directionality that is the inverse of direct links that use the "rel" construct. In both serializations for link sets defined here, inverse links may be represented as direct links using the "rel" construct and by switching the position of the resources involved in the link.

@mnot, please let us know if not OK.

mnot commented 3 years ago

Looks good, thanks.