eclipse-thingweb / eclipse-thingweb/node-wot
isThingModel is too permissive
Open
td-tools
thing-model
- Dominant language
- TypeScript
- Stars
- 192
- Forks
- 100
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 6
Description
There is a function called isThingModel in the td-tools package at https://github.com/eclipse/thingweb.node-wot/blob/master/packages/td-tools/src/thing-model-helpers.ts#L91
There are a couple of if conditions after line 107 that can result in a document recognized as a TM even if the document does not have `tm:thingModel` in the `@type`. I do not understand why those checks are added but if I am not wrong, everything after line 107 should be deleted and an `else` should be added instead that returns false.
Contributor guide
Assessment
This issue has not been assessed yet.