-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathonem2m.m.brewing.json
More file actions
48 lines (48 loc) · 1.59 KB
/
onem2m.m.brewing.json
File metadata and controls
48 lines (48 loc) · 1.59 KB
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
{
"id": "http://openinterconnect.org/onem2mmapping/schemas/onem2m.m.brewing.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description" : "Copyright (c) 2018 Open Connectivity Foundation, Inc. All rights reserved.",
"title": "Brewing",
"definitions": {
"onem2m.m.brewing": {
"type": "object",
"properties": {
"cupsNumber": {
"type": "integer",
"description": "The current number of the cups requested to brew",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.brewing",
"x-to-ocf": [
"oic.r.brewing.amountrequested = cupsNumber * 150"
],
"x-from-ocf": [
"cupsNumber = floor(oic.r.brewing.amountrequested / 150)"
]
}
},
"strength": {
"type": "integer",
"description": "The current strength of the drink taste. A higher value indicates a stronger taste",
"x-ocf-conversion": {
"x-ocf-alias": "oic.r.brewing",
"x-to-ocf": [
"oic.r.brewing.strengthrange[0] = 1",
"oic.r.brewing.strengthrange[1] = 5",
"oic.r.brewing.strength = strength"
],
"x-from-ocf": [
"oic.r.brewing.strengthrange[0] = 1",
"oic.r.brewing.strengthrange[1] = 5",
"strength = oic.r.brewing.strength"
]
}
}
}
}
},
"type": "object",
"allOf": [
{"$ref": "#/definitions/onem2m.m.brewing"}
],
"required": [ "cupsNumber"]
}