eclipse-thingweb / playground

Browser application for validating and designing W3C Thing Descriptions and Thing Models.
https://playground.thingweb.io/
Other
28 stars 19 forks source link

resolve tms using node-wot td-tools #451

Closed fatadel closed 1 year ago

fatadel commented 1 year ago

Last step of #364.

Closes #364.

netlify[bot] commented 1 year ago

Deploy Preview for playground-testing failed.

Name Link
Latest commit bebf7447685521ae80b2c3c9c1e51827b79faa4c
Latest deploy log https://app.netlify.com/sites/playground-testing/deploys/63f39c96b3f542000895ad59
egekorkan commented 1 year ago

Comments:

  1. We need tests for this though due to two reasons:
    • Tests are good due to usual reasons
    • Some TD and TM examples have not been maintained
  2. If the the referenced TM is extending another TM that is actually not available (see https://raw.githubusercontent.com/w3c/wot-testing/main/data/input_2022/TD/Ditto/TMs/ditto_dimmable-colored-lamp-1.0.0.tm.jsonld), the validation button freezes and console logs about 404 are put but nothing is shown to the user. This can happen and it should be clear to the user what the problem is. Like what is outputted when the first TM is not reachable.

To do tests, I had to create copies of Ditto TMs since they were not available

  1. Root TM for gas sensor: https://gist.githubusercontent.com/egekorkan/687f6c8c87433c6aafc07d9cea7a17db/raw/d3bb8a4b2485ae31067bbb2c5333719e6517ac6e/GasSensorRoot.tm.jsonld
  2. The TM for the gas sensor, extending the previous one: https://gist.githubusercontent.com/egekorkan/a6d97d414da1e7dce9a81d66631878ad/raw/921f6b181f5939440dd9c3428382a950a85d8717/GasSensor.tm.jsonld
  3. Changing the linked tm to the one above at https://raw.githubusercontent.com/w3c/wot-testing/main/data/input_2022/TD/Ditto/TDs/ditto_octopus-1_GasResistance.td.jsonld

This has resulted in correct behavior as expected. When I change the value of description at the TD that has been given in the root TM, the validation shows failure.