-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Based on the discussion in eclipse-thingweb/node-wot#1279 two points/issues arose. One is the following.
The current value()
function of InteractionOutput
requires as step 10 to validate the value.
I think there are good use-cases to avoid doing validation
- performance
- getting the value even if it does not validate
- ...
Note: I think the current requirement to MUST validate the data reported is also very heavy in a sense. I think there are (and will be) implementations out there that simply do not have the power to validate the data (no JSON schema library available etc).
I wonder how we can account for that? Say it is best effort only?
Anyhow, in the thingweb committer call we had the feeling that we should at least extend the current value function in a way that the user of the API can decide whether validation is done or not. This could be done in a backwards compatible way changing the current signature of
Promise<DataSchemaValue> value();
to something like
Promise<DataSchemaValue> value(optional ValueOptions = {});
dictionary ValueOptions {
boolean validate; /* default?*/
};
Yet another question is what the default behavior of validate
should be?