-
Notifications
You must be signed in to change notification settings - Fork 8
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
Define a protocol binding for readmultipleproperties
?
#158
Comments
Note: w3c/wot-thing-description#1357 points out that |
For |
Thanks, I have filed a separate issue to discuss that #159 |
This has now been addressed by w3c/wot-thing-description#1383 |
Arch call on April 24th: This is not a blocker but a proposed improvement, removing the "blocks publication" label. |
I looked into this a bit more, and whilst I like the idea of using I think my preferred way of doing this would instead be to standardise a semantic annotation you can add to a URI variable to denote that it's the variable for providing a list of properties to read, e.g. "uriVariables": {
"filter": {
"@type": "propertyNames",
"title": "The names of the properties to read",
"type": "array",
"items": {
"type": "string"
}
}
},
"forms": [
{
"op": ["readallproperties", "writemultipleproperties", "readmultipleproperties"],
"href": "properties{?filter}"
}
] However, we've also so far avoided defining a new JSON-LD context for any of the profiles. I'd really like to add standardised protocol bindings for the |
We should wait for the TD to land a solution for w3c/wot-thing-description#1685 and revisit in Profile-1.1. |
Two comments about this:
|
@egekorkan wrote:
Agreed, but my preferred solution would involve defining a TD extension context for the profile and it doesn't seem to be worth it to define that for this one operation (which is itself only an optimisation). I think it's OK to wait until a future version.
That's a good question, but essentially all the current profile mechanism does is to enforce a set of assertions on a Thing. Given that there are no assertions saying you can't provide a |
So far we haven't defined a protocol binding in the Core Profile for
readmultipleproperties
. An editor's note provides the following explanation:Basically an HTTP GET request doesn't usually have a body (though the HTTP specification doesn't explicitly forbid it), so people felt including an array of property names in the body would be a bit unusual.
A comment on w3c/wot-thing-description#1349 describes an alternative approach used by the Eclipse Ditto project based on URL query parameters. E.g.:
This is quite a neat solution which could be used as part of the Core Profile. Reading multiple properties could have some values in the case of devices with a very large number of properties.
As an aside, if we added a binding for
readmultipleproperties
then we could also add a binding forwriteallproperties
as well for completeness, which would basically have the same design aswritemultipleproperties
but perhaps with an additional defined error response if not all properties are included in a request.What do people think?
The text was updated successfully, but these errors were encountered: