Closed fatadel closed 1 year ago
@egekorkan should have mentioned this issue as well.
Also, this is a feature required for the TD 1.1 publication from internationalization point of view. CC @sebastiankb
I am sadly not able to test it but the changes in index.js and util.js are from playground and they work.
In the playground, we had an issue regarding string direction assertions. The issue applies to ediTDor as well, since it "visualizes" the structure of a TD in the right pane. So, this PR fixes that problem.
A TD to test
``` { "id": "urn:simpleWithDefaults", "@context": [ "https://www.w3.org/2022/wot/td/v1.1", { "@language": "ar-EG", "@direction": "rtl" } ], "title": "hello.", "description": "شيء يقيس درجة الحرارة و يظهر حالته", "descriptions": { "ar": "desc." }, "securityDefinitions": { "basic_sc": { "scheme": "basic", "in": "header" } }, "security": [ "basic_sc" ], "properties": { "status": { "type": "string", "readOnly": true, "writeOnly": false, "observable": false, "forms": [ { "href": "https://mylamp.example.com/status", "op": "readproperty", "contentType": "application/json" } ] } }, "actions": { "toggle": { "safe": false, "idempotent": false, "forms": [ { "href": "https://mylamp.example.com/toggle", "op": "invokeaction", "contentType": "application/json" } ] } }, "events": { "overheating": { "data": { "type": "string", "readOnly": true, "writeOnly": false }, "forms": [ { "href": "https://mylamp.example.com/oh", "op": "subscribeevent", "subprotocol": "longpoll", "contentType": "application/json" } ] } } } ```