forked from eclipse-thingweb/playground
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tm-extend.json
63 lines (63 loc) · 1.77 KB
/
tm-extend.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"title": "tm-extend",
"description": "A Thing Model MUST use at least one links entry with \"rel\":\"tm:extends\" that targets to a Thing Model that is be extended.",
"$schema ": "http://json-schema.org/draft/2019-09/schema#",
"is-complex": true,
"type": "object",
"properties": {
"links": {
"type": "array",
"items": {
"if": {
"$ref": "#/definitions/tm_extend_link_element"
},
"else": {
"$ref": "#/definitions/base_link_element"
},
"then": {
"const": "tm-extend=pass"
}
}
}
},
"additionalProperties": true,
"definitions": {
"anyUri": {
"type": "string"
},
"base_link_element": {
"type": "object",
"properties": {
"href": {
"$ref": "#/definitions/anyUri"
},
"type": {
"type": "string"
},
"rel": {
"type": "string"
},
"anchor": {
"$ref": "#/definitions/anyUri"
}
},
"required": ["href"],
"additionalProperties": true
},
"tm_extend_link_element": {
"allOf": [
{
"$ref": "#/definitions/base_link_element"
},
{
"properties": {
"rel": {
"const": "tm:extends"
}
},
"required": ["rel"]
}
]
}
}
}