{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/wot-thing-description/issues/140","repository_url":"https://api.github.com/repos/w3c/wot-thing-description","labels_url":"https://api.github.com/repos/w3c/wot-thing-description/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/w3c/wot-thing-description/issues/140/comments","events_url":"https://api.github.com/repos/w3c/wot-thing-description/issues/140/events","html_url":"https://github.com/w3c/wot-thing-description/issues/140","id":325291557,"node_id":"MDU6SXNzdWUzMjUyOTE1NTc=","number":140,"title":"Simplify to no forms field on sub-properties?","user":{"login":"mkovatsc","id":664090,"node_id":"MDQ6VXNlcjY2NDA5MA==","avatar_url":"https://avatars0.githubusercontent.com/u/664090?v=4","gravatar_id":"","url":"https://api.github.com/users/mkovatsc","html_url":"https://github.com/mkovatsc","followers_url":"https://api.github.com/users/mkovatsc/followers","following_url":"https://api.github.com/users/mkovatsc/following{/other_user}","gists_url":"https://api.github.com/users/mkovatsc/gists{/gist_id}","starred_url":"https://api.github.com/users/mkovatsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkovatsc/subscriptions","organizations_url":"https://api.github.com/users/mkovatsc/orgs","repos_url":"https://api.github.com/users/mkovatsc/repos","events_url":"https://api.github.com/users/mkovatsc/events{/privacy}","received_events_url":"https://api.github.com/users/mkovatsc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-05-22T13:22:22Z","updated_at":"2018-06-14T22:07:15Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"The Simplified TD allows for a recursive definition of Interaction Properties. The example shows a Property `status`, whose sub-property `battery` is also an Interaction Property that can be accessed directly:\r\n\r\n```\r\n  \"properties\": {\r\n    \"status\": {\r\n      \"readOnly\": true,\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"battery\": {\r\n          \"type\": \"number\",\r\n          \"minimum\": 0.0,\r\n          \"maximum\": 100.0,\r\n          \"forms\": [{\r\n            \"href\": \"/things/lamp/properties/status/batt\",\r\n            \"mediaType\": \"application/json\"\r\n          }] \r\n        },\r\n        \"rssi\": {\r\n          \"type\": \"number\",\r\n          \"minimum\": 0.0,\r\n          \"maximum\": 1.0\r\n        },\r\n        \"level\": {\r\n          \"type\": \"integer\",\r\n          \"minimum\": 0,\r\n          \"maximum\": 100\r\n        }\r\n      },\r\n      \"forms\": [{\r\n        \"href\": \"/things/lamp/properties/status\",\r\n        \"mediaType\": \"application/json\"\r\n      }]\r\n    }\r\n  }\r\n```\r\nWhile this allows for an efficient description of such structure, for instance found in OMA LWM2M and other existing platforms, it may not be intuitive enough -- as raised in Scripting and Binding call.\r\n\r\nWe could simplify and do not allow the `forms` field on sub-properties such as `battery` here. The functionality can still be described in a more verbose way:\r\n\r\n```\r\n  \"properties\": {\r\n    \"status\": {\r\n      \"readOnly\": true,\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"battery\": {\r\n          \"type\": \"number\",\r\n          \"minimum\": 0.0,\r\n          \"maximum\": 100.0\r\n        },\r\n        \"rssi\": {\r\n          \"type\": \"number\",\r\n          \"minimum\": 0.0,\r\n          \"maximum\": 1.0\r\n        },\r\n        \"level\": {\r\n          \"type\": \"integer\",\r\n          \"minimum\": 0,\r\n          \"maximum\": 100\r\n        }\r\n      },\r\n      \"forms\": [{\r\n        \"href\": \"/things/lamp/properties/status\",\r\n        \"mediaType\": \"application/json\"\r\n      }]\r\n    },\r\n    \"battery\": {\r\n      \"type\": \"number\",\r\n      \"minimum\": 0.0,\r\n      \"maximum\": 100.0,\r\n      \"forms\": [{\r\n        \"href\": \"/things/lamp/properties/status/batt\",\r\n        \"mediaType\": \"application/json\"\r\n      }]\r\n    }\r\n  }\r\n```\r\nAny comments?"},"comment":{"url":"https://api.github.com/repos/w3c/wot-thing-description/issues/comments/397453199","html_url":"https://github.com/w3c/wot-thing-description/issues/140#issuecomment-397453199","issue_url":"https://api.github.com/repos/w3c/wot-thing-description/issues/140","id":397453199,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NzQ1MzE5OQ==","user":{"login":"mjkoster","id":2302085,"node_id":"MDQ6VXNlcjIzMDIwODU=","avatar_url":"https://avatars1.githubusercontent.com/u/2302085?v=4","gravatar_id":"","url":"https://api.github.com/users/mjkoster","html_url":"https://github.com/mjkoster","followers_url":"https://api.github.com/users/mjkoster/followers","following_url":"https://api.github.com/users/mjkoster/following{/other_user}","gists_url":"https://api.github.com/users/mjkoster/gists{/gist_id}","starred_url":"https://api.github.com/users/mjkoster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjkoster/subscriptions","organizations_url":"https://api.github.com/users/mjkoster/orgs","repos_url":"https://api.github.com/users/mjkoster/repos","events_url":"https://api.github.com/users/mjkoster/events{/privacy}","received_events_url":"https://api.github.com/users/mjkoster/received_events","type":"User","site_admin":false},"created_at":"2018-06-14T22:07:15Z","updated_at":"2018-06-14T22:07:15Z","author_association":"NONE","body":"I will comment on my previous comment rather than editing it.\r\n\r\nIt seems like we don't prohibit an Interaction Property from having more than one data item (schema property) as in the example above. In this case, the Interaction Property has the semantics of a Schema Object rather than a Schema Property. Both of these are JSON Schema instances so it seems like we want Property to somehow be interact-able as a Schema Instance.\r\n\r\nI don't think we need to define Interaction Property as a subclass of dataschema to achieve this; I think a dotted line relation as is the case with Action and Event will allow for direct interaction with the resource."}}
{"actor":{"display_login":"mjkoster"}}