WebThingsIO / gateway

WebThings Gateway
http://webthings.io/gateway
Mozilla Public License 2.0
2.61k stars 336 forks source link

Remove value member of property affordances in Thing Descriptions #2854

Open benfrancis opened 3 years ago

benfrancis commented 3 years ago

For some reason the /things endpoint on the gateway includes a value member in each property affordance which provides the value of the property at the time the resource was requested. It has been noted that there are circumstances under which it also reports the wrong value.

I'm not sure how long it has been this way but according to the API specification property values should not be included in the Things resource, they should only be returned when fetching a Property resource or Properties resource. This is also not W3C compliant.

We should remove the value member from the Thing Descriptions, but before we do that we need to check whether this is consumed in the front end anywhere.

benfrancis commented 3 years ago

Note: The values also appear in Thing resources (Thing Descriptions) and we should make sure they're removed from there too.

This may be limited to certain adapters. It's reproduceable with the Virtual Things adapter.