node-wot icon indicating copy to clipboard operation
node-wot copied to clipboard

isThingModel is too permissive

Open egekorkan opened this issue 3 years ago • 2 comments

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.

egekorkan avatar Nov 24 '22 17:11 egekorkan

@relu91 @lukesmolo any opinion?

danielpeintner avatar Nov 25 '22 09:11 danielpeintner

Unfortunately I can't remember precisely, but this was a point of discussion with @relu91, so let me add him here.

lukesmolo avatar Nov 25 '22 09:11 lukesmolo