forked from openconnectivityfoundation/devicemodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoic.devicemap-schema.json
116 lines (116 loc) · 3.07 KB
/
oic.devicemap-schema.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
{
"id": "http://openconnectivity.org/iotdatamodels/schemas/oic.devicemap-schema.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2016 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "OCF Device Map Schema",
"definitions": {
"deviceinformation": {
"type": "object",
"properties": {
"devicename": {
"type": "string",
"description": "Natural language name of the device"
},
"devicetype": {
"type": "string",
"description": "OCF defined device id in the form oic.d.*",
"pattern": "oic.d.*"
},
"vertical": {
"type": "string",
"enum": ["Smart Home","Healthcare","Industrial","Framework","PVSystem"]
}
}
},
"resourceinformation": {
"type": "object",
"properties": {
"resourcetypetitle": {
"type": "string",
"description": "Natural language name of the resource"
},
"resourcetypeid": {
"type": "string",
"description": "OCF defined resource type id in the form oic.r.* or oic.wk.*",
"pattern": "oic.[r|wk].*"
}
}
},
"aminformation": {
"type": "object",
"properties": {
"atomicmeasurementname": {
"type": "string",
"description": "Natural language name of the atomic measurement"
},
"atomicmeasurementype": {
"type": "string",
"description": "OCF defined resource type id in the form oic.r.*",
"pattern": "oic.r.*"
},
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/resourceinformation"
},
"minItems": 1
},
"optionalresources": {
"type": "array",
"items": {
"$ref": "#/definitions/resourceinformation"
}
}
}
},
"resourcearray": {
"type": "object",
"properties": {
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/resourceinformation"
},
"minItems": 0
}
}
},
"recommendedresourcearray": {
"type": "object",
"properties": {
"recommendedresources": {
"type": "array",
"items": {
"$ref": "#/definitions/resourceinformation"
},
"minItems": 0
}
}
},
"amarray": {
"type": "object",
"properties": {
"atomicmeasurements": {
"type": "array",
"items": {
"$ref": "#/definitions/aminformation"
},
"minItems": 1
}
}
},
"devicemapentry": {
"type": "object",
"allOf": [
{"$ref": "#/definitions/deviceinformation"},
{"$ref": "#/definitions/resourcearray"},
{"$ref": "#/definitions/recommendedresourcearray"},
{"$ref": "#/definitions/amarray"}
]
}
},
"type": "array",
"items": {
"$ref": "#/definitions/devicemapentry"
}
}