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
Examples for actions using URI variables should explain why not using input #910
Comments
I agree with the lack of explanation. I can tell from my experience is that uriVariables are generally used with an HTTP GET request in order to send data. So in the TD case, if there is an interaction that is physically an action (like brewing a coffee) but the implementation is programmed with an HTTP GET + uriVariables, we have to use the uriVariables. It also makes more sense in properties when the Consumer can do filtering on an Object. @fatadel did it for the node-wot tutorial at http://www.thingweb.io/smart-coffee-machine.html . Search for the line |
Actually it was more useful to look at the code: There you can see the same point I raised: it is using I understand However I would argue the use case could be also solved without IMHO |
In my opinion the only reason for having If I read your argument correctly, you are saying that on the TD level it should not be any difference between uriVariables input vs. any other input. The binding should build the according request whether with uriVariables or the information in the body. Correct? |
As a note, this issue is closely related to #569 .
Is it possible to achieve both to describe existing services and encapsulate uriVariables in Binding Templates at the same time? |
In 2020-06-12 telecon, @egekorkan volunteered to make a PR with @danielpeintner 's openweathermap example: @zolkis is going to create another issue with regards to multiple inputs to action from Scripting API's aspect. There is something that needs to be clarified in TD. |
I think that this is properly described now with a note that says that this should be done only for retrofitting when needed |
In Example 21 for instance, it should be explained why
uriVariables
have to be used instead of theinput
property of theActionAffordance
, which has qualifiers likeidempotent
which are not possible withuriVariables
.In general, the necessity and use of
uriVariables
is still not well explained in the TD spec.For instance, they act as a way to convey parameters to all interactions.
From there, a Property affordance is like an action, since it takes URI variables (defined by DataSchema). So we have inputs in form of uriVariables and output in form of the Property affordance itself since it extends DataSchema.
I find this very messy. It would be more clear if at InteractionAffordance level we'd have the
output
property, also for Properties and Events.Then for Actions, we don't really need
input
once we haveuriVariables
. There is no good explanation in the TD spec why both are needed. Or we need a way to sayinputs
becomeuriVariables
in the bindings.If both are to be kept, they must be properly explained, with use cases and examples.
The text was updated successfully, but these errors were encountered: