-
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
Clarifications on readmultipleproperties and writemultipleproperties / writeallproperties #1349
Comments
I agree with this.
The idea behind this is that some Things require all of them to be present (why is that I cannot know but I can imagine some implementations that simply look into the key of the input without checking if the key exists). writeall is for me indeed a specific case of writemultiple
I think that a fixed set should be possible even if not allowed by the specification at the moment. In MQTT, one can subscribe to |
@danielpeintner wrote:
My assumption would be that an array is always provided for
I think that is a valid assumption and is the reason we didn't bother specifying a protocol binding for See the Editor's Note at https://w3c.github.io/wot-profile/#h-ednote-5 which explains why we only specified protocol bindings for
This might seem a bit arbitrary but I think |
My gut feeling tells me that many arguments are coming from reading between the lines or making personal assumptions. Having said that, I think this should not be the case and requires proper specification. |
I can give input on how e.g. Eclipse Ditto allows something like
That would e.g. return such a JSON document: {
"manufacturer": "ACME Inc.",
"serialNo":"12345aaa",
"productionDate":"2022-01-17T13:11:24Z"
} If the {
"manufacturer": "ACME Inc.",
"serialNo":"12345aaa",
"productionDate":"2022-01-17T13:11:24Z",
"anotherProperty": true
} Such a "field selector" is a common practice at JSON APIs (keyword: partial request/response) to only fetch a defined subset. |
I have an idea, inspired by how we describe how security credentials should be sent by the Consumer. Currently, multiple security schemes have the keyword {
"properties": {
"temperature": {
"title": "temperature",
"observable": false,
"readOnly": true,
"type": "number",
"forms": []
},
"humidity": {
"title": "humidity",
"observable": false,
"readOnly": true,
"type": "number",
"forms": []
},
"colorTemperature": {
"title": "colorTemperature",
"observable": false,
"readOnly": true,
"type": "number",
"forms": []
}
},
"forms": [
{
"op": [
"readmultipleproperties"
],
"href": "/properties",
"in": "body",
"htv:methodName": "POST"
},
{
"op": [
"readmultipleproperties"
],
"href": "/properties",
"in": "urivariables",
"htv:methodName": "GET",
"uriVariables": {}
},
{
"op": [
"readmultipleproperties"
],
"href": "/properties",
"in": "cookie",
"htv:methodName": "GET"
},
{
"op": [
"readmultipleproperties"
],
"href": "/properties",
"in": "static",
"propertyNames": [
"colorTemperature",
"humidity"
]
}
]
} |
I like that idea. e.g., @thjaeckle mentioned the following example Note: these are HTTP use-cases. I think we should not forget about other protocols. |
from today's TD call:
|
(A) readmultipleproperties
The last par in 5.3.1.1 Thing reads as follows:
Does this mean that in some cases no input array needs to be given and a fixed set of names can be assumed OR do we always need to pass an array on binding level?
(B) Difference between writemultipleproperties and writeallproperties
Is the assumption in the scripting API correct that passing all writable properties to writemultipleproperties OR writeallproperties form lead to exactly the same result? OR are there any differences one needs to be aware of. Hence, the difference is only whether all properties are provided or (maybe) a subset. In a sense writeallproperties seems to be a special case of writemultipleproperties...
Somehow these 3 ops values seem to be under-specified.
relates with w3c/wot-scripting-api#219
The text was updated successfully, but these errors were encountered: