w3c / wot-profile

Web of Things (WoT) Profile
http://w3c.github.io/wot-profile/
Other
16 stars 8 forks source link

Validatible TDs #170

Open mlagally opened 2 years ago

mlagally commented 2 years ago

Supporters: Intel, Oracle, Ben, Cristiano

Whether or not a TD satisfies the requirements of a given profile should be verifiable with automated tools.

We can use the existing TD JSDON Schema as a basis and reuse the existing tooling (TD-playground)

egekorkan commented 2 years ago

This is not possible for the current "core" profile since the way actions work require out of band information on how the profile works. Thus, a TD that has an Action Affordance cannot be validated purely by the TD whether it satisfies the core profile or not

See https://w3c.github.io/wot-profile/#invokeaction

mlagally commented 2 years ago

Arch call on 9.2.: Action affordance needs special attention. We cannot statically validate "behavior", calling an action would required.

Expectation on validation needs to be defined based on what we do for testing. Need to satisfy the expectation / trust / guarantee of a profile. Certified devices from trusted vendors MUST follow the specification document.

benfrancis commented 2 years ago

Whether or not a thing description meets the constraints of a profile is only one part of conformance. Probably the more important test is whether the communication endpoints of things provided in forms behave as defined in the protocol binding defined for the profile specification. That is the case for all interaction affordances, not just actions. The protocol binding also defines a format for error messages and how events should be serialised as server-sent events for example. This is all information which isn't validateable from the Thing Description alone, because the protocol binding specification adds additional assumptions on top of what is described in the Thing Description.

There may well be constraints to validate on the Thing Description itself, but full validation would require a set of automated tests which actually communicate with the thing to check the contents of response payloads for a given set of requests, generated for the affordances in its Thing Description.

Certified devices from trusted vendors MUST follow the specification document.

What are "certified devices" and who is going to certify them? Who decides who "trusted vendors" are? This is not how W3C standards typically work.

It is up to individual thing developers to denote that a thing conforms with a profile in its thing description, and consumers need to be resilient enough to cope with situations where they claim to conform but actually don't.