-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Labels
PR neededcommon definitionsdiscussions on the mechanisms to group more definitions and their defaultsdiscussions on the mechanisms to group more definitions and their defaults
Description
As a result of the discussion at #2154 , we have decided that the new keywords like connection, form, etc. cannot be a string type anymore. The TDs will have either an object for an in-place definition of the definition or will have an array which lists all the possible definitions that are applied. Thus we can have examples like the following:
{
"@context": "https://www.w3.org/ns/wot-next/td",
"connectionDefinitions": {
"ipv4": {
"base": "https://192.168.1.10:8080"
},
"ipv6": {
"base": "https://[2001:db8:85a3::8a2e:370:7334]:8080"
}
},
"connection": ["ipv4", "ipv6"],
"form": {
"contentType": "application/json"
},
"security": {
"scheme": "nosec"
},
"properties": {
"prop1": {
"type": "string",
"forms": [
{
"href": "/props/prop1"
}
]
},
"prop2": {
"type": "string",
"forms": [
{
"href": "/props/prop2"
}
]
}
}
}Internally, that prop1 would expand to something like the following:
"prop1": {
"type": "string",
"forms": [
{
"href": "https://192.168.1.10:8080/props/prop1",
"security": {
"scheme": "nosec"
},
"contentType": "application/json"
},
{
"href": "https://[2001:db8:85a3::8a2e:370:7334]:8080/props/prop1",
"security": {
"scheme": "nosec"
},
"contentType": "application/json"
}
]
}As a result, the proposal and the examples in there should be updated in a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PR neededcommon definitionsdiscussions on the mechanisms to group more definitions and their defaultsdiscussions on the mechanisms to group more definitions and their defaults