-
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
Add formal validation process #1043
Comments
Related also to partial TD validation: |
Btw, playground has some additional checks at https://github.com/thingweb/thingweb-playground/blob/master/packages/core/shared.js These are actual things that need to be checked but cannot be done with a JSON Schema. |
My proposal (from the F2F, in my presentation, slide 6): Define "Syntactic Validation":
Define "Semantic Validation":
Note there will probably be a number of assertions that can't be checked by either mechanism, e.g. behavioural assertions. These can just be unlabelled. |
(Discussed in the F2F): Checking for "required" elements defined in a TM would be useful, but requires fetching the TM, which might be a privacy risk. So when we define validation formally, perhaps this could be under "extended validation", which should only be applied in contexts where privacy is not an issue (e.g. during development, but not in deployment). Similar issues arise for validating extensions (e.g. semantic extensions, etc.; for example, by fetching SHACL definitions or JSON Schemas associated with extensions). |
BTW this also means the "type" relation pointing at TMs should be to a "fixed" URL, since we will consider things with the same URL to be the same "type" and things with different URLs to be different. The expectation is that non-development systems, i.e. gateways, would "know" a set of TM URLs and would not have to fetch them. This also implies though that directory validators (a service running in gateways/hubs...) would not normally fetch TMs to validate this, but it might be recommended as a "extra" validation step during development. |
Both discovery and scripting (for Partial TDs) need a "formal validation" of TDs (and Partial TDs) that they are passed.
It would be better if the (minimum) validation process was defined clearly and formally in one place, and IMO that should be in the TD spec.
At the very least the validation should be against the JSON Schema (although there is the ongoing annoyance that JSON Schemas are not formal specs...).
See
The text was updated successfully, but these errors were encountered: