Skip to content

Commit 2e5cdff

Browse files
committed
feat: update JSON Schema definition to latest version
1 parent 84fadb8 commit 2e5cdff

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/src/definitions/validation/thing_description_schema.dart

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ class ThingDescriptionValidationException extends ValidationException {
3434

3535
final Map<String, dynamic> _rawThingDescriptionSchema = <String, dynamic>{
3636
'title': 'Thing Description',
37-
'version': '1.1-10-June-2022',
37+
'version': '1.1-23-March-2023',
3838
'description':
3939
'JSON Schema for validating TD instances against the TD information '
4040
'model. TD instances can be with or without terms that have default '
4141
'values',
42-
'\$schema ': 'http://json-schema.org/draft-07/schema#',
42+
'\$schema': 'http://json-schema.org/draft-07/schema#',
4343
'\$id':
4444
'https://raw.githubusercontent.com/w3c/wot-thing-description/main/validation/td-json-schema-validation.json',
4545
'definitions': {
@@ -58,7 +58,8 @@ final Map<String, dynamic> _rawThingDescriptionSchema = <String, dynamic>{
5858
'oneOf': [
5959
{
6060
'type': 'array',
61-
'items': {'type': 'string'}
61+
'items': {'type': 'string'},
62+
'minItems': 1
6263
},
6364
{'type': 'string'}
6465
]
@@ -148,7 +149,7 @@ final Map<String, dynamic> _rawThingDescriptionSchema = <String, dynamic>{
148149
}
149150
},
150151
{
151-
'\$comment': 'Only the new context URI',
152+
'\$comment': 'Only the old context URI',
152153
'\$ref': '#/definitions/thing-context-td-uri-v1'
153154
}
154155
]
@@ -261,7 +262,8 @@ final Map<String, dynamic> _rawThingDescriptionSchema = <String, dynamic>{
261262
'type': 'object',
262263
'properties': {
263264
'contentType': {'type': 'string'}
264-
}
265+
},
266+
'required': ['contentType']
265267
},
266268
'form_element_base': {
267269
'type': 'object',

0 commit comments

Comments
 (0)