editdor
editdor copied to clipboard
TM to TD generation improvements and bugs
I was generating the implementation report for editdor and found the following problems when looking at TM to TD generation specifically:
- The pop up UI asks for "which placeholders to replace" even where there are no placeholders.
- tm:extends is not removed when the TD is generated. TD spec says:
If used, links element entry with "rel":"tm:extends" MUST be removed from the current Partial TD
- required affordances can be deselected and not carried over:
All required interactions (not listed in tm:optional) MUST be taken over to the Partial TD instance.
-
tm:extends
is not resolved. So the final TD does not have those:
Copy all definitions from the input Thing Model to the resulting Partial TD instance. If used, the extension and imports feature MUST be resolved and represented in the Partial TD instance according to 9.3.2 Extension and Import.
- TD generation fails in this specific case since the URL parsing fails:
{
"@context": "https://www.w3.org/2019/wot/td/v1",
"title": "ediTDor Thing",
"@type": "tm:ThingModel",
"securityDefinitions": {
"nosec_sc": {
"scheme": "nosec"
}
},
"security": "nosec_sc",
"properties": {
"dim": {
"title": "Dimming level",
"type": "integer",
"minimum": 0,
"maximum": 100
},
"dim2": {
"title": "Dimming level",
"type": "integer",
"minimum": 0,
"maximum": 100
}
},
"tm:optional": [
"/properties/dim2"
]
}
This TM also is picked up as TD for some reason. It has correct @type