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
"Thing description" for Directory should be a "Thing Model" #86
Comments
Is that the WoT Binding Template? |
Thing Models used to be called "Thing Description Templates" which were basically Thing Descriptions that omitted instance-specific information. But the TD 1.1 spec is attempting to make this a little clearer and allow URL templates (for instance) rather than just omitting hrefs. I think all we need to do is use the following: "base": "https://{DIRECTORY}" or the like. I'd rather use a template like this rather than omitting the base so it's clear that it needs to be filled in. |
@farshidtz there is work going on here: https://w3c.github.io/wot-thing-description/#thing-model @mmccool: I completely agree :) |
Thanks. It is clear now. But I think it needs more changes to become a Thing Model:
wot-discovery/directory.td.json Line 51 in fad66ff
wot-discovery/directory.td.json Line 3 in fad66ff
wot-discovery/directory.td.json Lines 8 to 49 in fad66ff
My suggestion is to keep the Thing Description as is: An example TD. |
The Thing Model is still under discussion, but I don't see any problem in leaving SecurityDenifitions as long as we substitute specific URLs with URL templates. |
When consumed, IMHO it should be a TD, or instance-specific information needs to be shared out of band, right? |
@benfrancis can you clarify your downvote, please? Note that I updated the description to clarify that I meant in the spec itself (an actual TDD instance would still return a TD), and that we should need to see Thing Models updated to include templates for security schemes and form templates, since we need those to fully specify what we want for TDDs. We need to make clear in the TD discussion that TDDs are a use case for Thing Models and suggest updates to the specification of TMs so that they meet our needs (as discussed above). |
@mmccool Thank you for the clarification, I was indeed confused by your original description. From scanning the F2F meeting minutes I suspected I may have misunderstood that context, but hadn't had chance to catch up yet, so apologies for the misunderstanding. I've removed the downvote. I just wanted to make sure that a physical device providing a directory service (i.e. a gateway) can use a single Thing Description to describe its directory service in addition to other properties, actions and events representing its own physical affordances. I'm still not keen on the general idea of inventing a new JSON templating language (Thing Description Templates/Thing Models) just for WoT Thing Descriptions, but I don't have a particular objection to using it as a mechanism to describe the directory API in the WoT Discovery specification itself. |
To clarify, a TDD instance would return a TD, not a TM. The TM is just a template that constrains the TD used by TDDs. We need to take our current "example TD" and turn it into a TM as a starting point. If we're not sure about something (e.g. should we have securityDefinitions) we can just omit them for now, then argue about whether we should add them later. I think we should keep the current TD as an example since it DOES show some of these blanks filled in (eg. security). |
Note we can leave the "scopes" in the forms even in a TM that does not define a securityScheme. They are orthogonal to the use of OAuth, and having consistent scopes across all TDDs is a fine thing. |
Note the data schema for query responses needs some consideration. For instance, the return data schema for XPath 3.1 may not include objects since it is converted from XML. See #248. Also, JSONPath and XPath APIs are only "suggestions" (informative) and may change. If the TM is normative, then including them is troublesome, but perhaps we can mark them as informative (in the TM, and in the introduction). |
I don't like what I'm about to suggest due to its complexity, but I think that is technically the right way to do it: Move JSONPath and XPath to another TM kept in an informative section which extends the normative one. TM extension and import: https://w3c.github.io/wot-thing-description/#thing-model-extension-import |
XPath is not going to change, nor should SPARQL. These should be optional but normative.
JSONPath is, however, subject to change, and the IETF spec is missing some key features like substring matching, and that’s an issue.
We *could* just leave it out.
Michael McCool
From: Farshid Tavakolizadeh ***@***.***>
Date: Friday, February 18, 2022 at 9:01 AM
To: w3c/wot-discovery ***@***.***>
Cc: Mccool, Michael ***@***.***>, Mention ***@***.***>
Subject: Re: [w3c/wot-discovery] "Thing description" for Directory should be a "Thing Model" (#86)
@mmccool<https://github.com/mmccool>
JSONPath and XPath APIs are only "suggestions" (informative) and may change. If the TM is normative, then including them is troublesome, but perhaps we can mark them as informative (in the TM, and in the introduction).
I don't like what I'm about to suggest due to its complexity, but I think that is technically the right way to do it:
Move JSONPath and XPath to another TM kept in an informative section which extends the normative one. TM extension and import: https://w3c.github.io/wot-thing-description/#thing-model-extension-import
—
Reply to this email directly, view it on GitHub<#86 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA4JY6E33JZIWIUDLAS6IW3U3Y7IJANCNFSM4SYMIX2A>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
There is now a TM in the spec so I am closing this issue. |
The TD defined for a Directory service should really be a Thing Model. We should also "template" the "base" parameter (or omit it, and say it needs to be added when the Thing Model is instantiated).
Since we are talking about a class of things, we should have a Thing Model. However, the definition of Thing Model needs to be updated to allow specifying security scheme templates, form templates (including URL templates giving https), etc.
The text was updated successfully, but these errors were encountered: