Skip to content

Commit

Permalink
Merge pull request #476 from thingweb/ege-schema-update
Browse files Browse the repository at this point in the history
Schema update
  • Loading branch information
egekorkan authored Jul 5, 2023
2 parents 84bc8b8 + 8df412d commit c4f6cce
Show file tree
Hide file tree
Showing 4 changed files with 434 additions and 111 deletions.
32 changes: 32 additions & 0 deletions packages/core/examples/tds/invalid/emptyOpArray.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"id": "urn:simple",
"@context": "https://www.w3.org/2022/wot/td/v1.1",
"title": "MyLampThing",
"description": "Valid TD copied from the spec's first example",
"securityDefinitions": {
"basic_sc": { "scheme": "basic", "in": "header" }
},
"security": ["basic_sc"],
"properties": {
"status": {
"type": "string",
"forms": [{ "href": "https://mylamp.example.com/status", "op":[] }]
}
},
"actions": {
"toggle": {
"forms": [{ "href": "https://mylamp.example.com/toggle" }]
}
},
"events": {
"overheating": {
"data": { "type": "string" },
"forms": [
{
"href": "https://mylamp.example.com/oh",
"subprotocol": "longpoll"
}
]
}
}
}
14 changes: 9 additions & 5 deletions packages/core/td-schema-full.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "Thing Description",
"version": "1.1-10-June-2022",
"version": "1.1-05-July-2023",
"description": "JSON Schema for validating TD instances against the TD information model. For a TD to validate this schema it must contain all the default terms defined in Section 5.4",
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
Expand Down Expand Up @@ -376,7 +376,8 @@
"items": {
"type": "string",
"enum": ["readproperty", "writeproperty", "observeproperty", "unobserveproperty"]
}
},
"minItems": 1
}
]
}
Expand All @@ -402,7 +403,8 @@
"items": {
"type": "string",
"enum": ["invokeaction", "queryaction", "cancelaction"]
}
},
"minItems": 1
}
]
}
Expand All @@ -428,7 +430,8 @@
"items": {
"type": "string",
"enum": ["subscribeevent", "unsubscribeevent"]
}
},
"minItems": 1
}
]
}
Expand Down Expand Up @@ -474,7 +477,8 @@
"subscribeallevents",
"unsubscribeallevents"
]
}
},
"minItems": 1
}
]
}
Expand Down
Loading

0 comments on commit c4f6cce

Please sign in to comment.