Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schema update #476

Merged
merged 3 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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