-
Notifications
You must be signed in to change notification settings - Fork 63
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
No mechanism to indicate the "desired" form entry #877
Comments
Previously we have discussed using the order of multiple forms to assign priority. However, the consensus of that discussion was that some consumers might do this, but we decided not to have a "MUST" assertion saying they do. If some consumers assigned a meaning to the other, then even if no meaning is assigned to the order by the specification, I think we should have an assertion that processors should not reorder forms arbitrarily, to avoid breaking such consumers (and maybe future-proofing against using order to assign priority later). |
I think that is the right formulation (SHOULD NOT) since clients MAY still choose whichever Form found in the TD. However, as discussed in the Scripting call, it makes sense to be able to select the Form from an application, so the Scripting API will add that option to the interactions exposed by ConsumedThing. Also, when specifying an ExposedThing with Forms, Scripting API implementations SHOULD NOT change the order clients specified for Forms. This is independent of the decision the TD TF has made and ensures compatibility with eventual later policies. |
In TD call on 2/14, we discussed and suggest to say something like "Clients may choose the first form entry that works for them." in TD specification. This does not introduce any new constraint. |
@takuki can you provide a PR for this statement? |
please checkout PR #1108 if it is working for you |
PR merged |
We got the request in the Scripting API task force that scripts might want to choose which form is used. In the sample TD below a script would like to decide which form entry is used for a given interaction (e.g.,
form[0]
for the interactiontoggle
because it uses HTTP).Besides the desired intent of a script e.g., preferring HTTP (which is not supported in scripting yet) there is also no way to indicate in a TD what form entry is preferred. WoT runtimes are free to pick any form while it seems that there is an unwritten assumption that the order in the array might be an indicator.
Does it make sense to have a more explicit mechanism in a TD that indicates the preferred form entry or to make the unwritten assumption more evident in the specification?
The text was updated successfully, but these errors were encountered: