w3c / wot-thing-description

Web of Things (WoT) Thing Description
http://w3c.github.io/wot-thing-description/
Other
131 stars 63 forks source link

Need Fragment Identifier IANA registration for application/td+json #1064

Open mmccool opened 3 years ago

mmccool commented 3 years ago

Apparently, technically, to use JSON Pointer to refer to part of a TD, the fragment identifier needs to be registered for the media type. There is in fact no fragment identifier rule defined for application/json and https://www.ietf.org/rfc/rfc6839.txt explicitly says that for derived types like application/td+json, the rule is inherited from application/json (so, if we don’t specify a rule, there isn’t one).

The “body” security scheme is used internally in a TD and not with a URL so doesn’t need this. However it would be handy for links from a TD to parts of another TD, as in the proposed geolocation information model.

Of course we should do the same thing for TMs.

mmccool commented 3 years ago

We also need to clean up definitions for relative URLs and partial URLs (eg only fragment identifier part in URL that refers to current document)

sebastiankb commented 3 years ago

I am not 100% sure I understand your request. Is there a problem that JSON pointer processors are not able to parse TDs because the media type is not known?

mmccool commented 3 years ago

@sebastian, formally, to use a fragment identifier scheme in a URL this has to be defined in the IANA content type, or in a parent type. However, neither application/json nor application/jsonld define one. This is not a big deal, it's just a technicality.