-
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
meta operations when multiple content types exist #1814
Comments
Currently WebThings Gateway will just return This because the To be honest I'm not sure how it behaves since links were replaced by forms, because I don't have a camera device to hand to test with and the virtual things adapter hasn't been updated yet. Ideally for base64 encoding also wouldn't work for all properties, e.g. a video stream. Ultimately if a Consumer requests a JSON response and there is no JSON representation of a property resource, then the Thing can't provide one.
Maybe, but I think you'd need a payload binding specification to define how to map property names onto property values where each property value is essentially a separate file. The simplest thing for the Thing Description specification to say would probably be that if a Consumer asks for a JSON response to a readallproperties request and no JSON representation of a given property exists, then that property should be given the value |
Thanks a lot for the insight! I think that your approach would be valid for a profile (or default behavior) but a generic solution seems tricky as we would need to describe one of the behaviours:
First of all, the simple case should be easy to describe and should probably be the default. Something (ugly) like Small note:
You can have two forms in this case but we would need a way to indicate that the data schema applies only to one (base64 encoding). |
Currently, the meta operations such as
readallproperties
are not clear about what should happen if there are properties with different content types. For example, there could be multiple JSON properties but one PNG. Given that a meta operation needs a contentType as well, what should happen?For example, a TD with 4 JSON, 2 PNG properties and a Thing-level form with JSON content type, I can see the following possibilities:
readmultipleproperties
since the Consumer will not get all the properties in the end.readallproperties
and should be flagged as a linting/validation error.I think WebThings has support for images so maybe @benfrancis has an idea already?
Note: Putting 2.0 label straightaway
The text was updated successfully, but these errors were encountered: