Skip to content
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

Advanced TM Validation #364

Closed
egekorkan opened this issue Nov 3, 2022 · 2 comments · Fixed by #455
Closed

Advanced TM Validation #364

egekorkan opened this issue Nov 3, 2022 · 2 comments · Fixed by #455
Assignees

Comments

@egekorkan
Copy link
Member

We need to have a more advanced validation of TDs and TMs that refer to each other in different ways.

These different ways are explained at https://w3c.github.io/wot-thing-description/#thing-model but some examples are:

  • respecting tm:optional (or not respecting non-optional)
  • making sure that types are not overwritten

We should implement this, first in the core as a separate file since such requests to fetch TMs may not work on the browser. Integrating it into the CLI would be the next step.

Also see: https://w3c.github.io/wot-thing-description/#thing-model-td-generation-examples

The return of this validation should be more intelligent than a simple boolean. The input TD or TM may not have issues but the linked ones may.

We should first start with an analysis of what kind of validations are needed. All the assertions are at https://w3c.github.io/wot-thing-description/testing/report11.html#automated_validation_results . The ones relating to TMs start with thing-model- or tm-

@egekorkan
Copy link
Member Author

The procedure has to be conformant to https://w3c.github.io/wot-thing-description/#thing-model-td-generation

@egekorkan
Copy link
Member Author

So for now, we have agreed to do this in 3 PRs:

  1. Doing top level affordance checks and look if they respect tm:optional. PR Advanced TM validation Part 1 #383 is doing that
  2. Doing JSON Structure and Value checks: Basically seeing if all the keys and values of the TM are in the TD
  3. Resolving the TM links via node-wot tools to have a full TM that can be used in step 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants