-
Notifications
You must be signed in to change notification settings - Fork 10
/
DelayDefrostResURI.swagger.json
176 lines (176 loc) · 6.57 KB
/
DelayDefrostResURI.swagger.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
{
"swagger": "2.0",
"info": {
"title": "Delay Defrost",
"version": "2021-01-26",
"license": {
"name": "OCF Data Model License",
"url": "https://github.com/openconnectivityfoundation/core/blob/e28a9e0a92e17042ba3e83661e4c0fbce8bdc4ba/LICENSE.md",
"x-copyright": "copyright 2016-2021 Open Connectivity Foundation, Inc. All rights reserved."
},
"termsOfService": "https://openconnectivityfoundation.github.io/core/DISCLAIMER.md"
},
"schemes": ["http"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/DelayDefrostResURI" : {
"get": {
"description": "This Resource describes the delay defrost function as defined by the US Energy Star Specifications.\nSee Energy Star Refrigerator Requirements Version 5 Section 4).\n(https://www.energystar.gov/sites/default/files/specs//private/ENERGY%20STAR%20Final%20Version%205.0%20Residential%20Refrigerators%20and%20Freezers%20Program%20Requirements.pdf)\nThe Property \"status\" is a boolean indicating whether the function is on, if off then defrost is scheduled as part of normal device operation.\nThe Property \"startTime\" is an RFC3339 full-time encoded start time for the interval in which defrost shall not occur.\nThe Property \"stopTime\" is an RFC3339 full-time encoded stop time for the interval in which defrost shall not occur.\nThe Property \"interval\" with additional range restrictions is the time in minutes of the period that starts at starttime (if not present the default is 240).\nThe Properties \"stopTime\" and \"interval\" are mutually exclusive; they cannot both be present in a Resource instance.",
"parameters": [
{"$ref": "#/parameters/interface"}
],
"responses": {
"200": {
"description": "",
"x-example":
{
"rt": ["oic.r.delaydefrost"],
"if": ["oic.if.a", "oic.if.baseline"],
"startTime": "06:00:00Z",
"status": false
},
"schema": { "$ref": "#/definitions/DelayDefrost" }
}
}
},
"post": {
"description": "Activates the desired Delay Defrost functions\n",
"parameters": [
{"$ref": "#/parameters/interface"},
{
"name": "body",
"in": "body",
"required": true,
"schema": { "$ref": "#/definitions/DelayDefrost-Update" },
"x-example":
{
"status": true,
"startTime": "06:00:00Z",
"interval": 180
}
}
],
"responses": {
"200": {
"description" : "Indicates that the DelayDefrost function was changed.\nThe new representation may be provided in the response.\n",
"x-example":
{
"status": true,
"startTime": "06:00:00Z",
"interval": 180
}
,
"schema": { "$ref": "#/definitions/DelayDefrost" }
},
"403": {
"description" : "Indicates the update to the time properties was rejected.\nReasons for rejection:\n invalid time entry\nThe current unchanged representation may be provided in the response.\n",
"x-example":
{
"status": true,
"startTime": "06:00:00Z",
"interval": 180
},
"schema": { "$ref": "#/definitions/DelayDefrost" }
}
}
}
}
},
"parameters": {
"interface": {
"in": "query",
"name": "if",
"type": "string",
"enum": ["oic.if.a", "oic.if.baseline"]
}
},
"definitions": {
"DelayDefrost" : {
"properties": {
"rt": {
"description": "The Resource Type.",
"items": {
"enum": ["oic.r.delaydefrost"],
"maxLength": 64,
"type": "string"
},
"minItems": 1,
"uniqueItems": true,
"readOnly": true,
"type": "array"
},
"status": {
"description": "Indicates whether any supported delay defrost function is active.",
"type": "boolean"
},
"interval": {
"description": "Defrost interval as defined by Energy Star.",
"minimum": 1,
"maximum": 1440,
"default": 240,
"type": "integer"
},
"stopTime": {
"description": "Stop time for the time period, if present interval cannot be present. This is the time of day at which the delay interval stops.",
"type": "string",
"format": "time"
},
"startTime": {
"description": "Start time for the time period. This is the time of day at which the delay interval starts.",
"type": "string",
"format": "time"
},
"n": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/n"
},
"id": {
"$ref": "https://openconnectivityfoundation.github.io/core/schemas/oic.common.properties.core-schema.json#/definitions/id"
},
"if": {
"description": "The OCF Interface set supported by this Resource.",
"items": {
"enum": [
"oic.if.a",
"oic.if.baseline"
],
"type": "string"
},
"minItems": 2,
"uniqueItems": true,
"readOnly": true,
"type": "array"
}
},
"type": "object",
"required": ["status"]
},
"DelayDefrost-Update" : {
"properties": {
"status": {
"description": "Indicates whether any supported delay defrost function is active.",
"type": "boolean"
},
"interval": {
"description": "Defrost interval as defined by Energy Star.",
"minimum": 1,
"maximum": 1440,
"default": 240,
"type": "integer"
},
"stopTime": {
"description": "Stop time for the time period, if present interval cannot be present. This is the time of day at which the delay interval stops.",
"type": "string",
"format": "time"
},
"startTime": {
"description": "Start time for the time period. This is the time of day at which the delay interval starts.",
"type": "string",
"format": "time"
}
},
"type": "object",
"required": ["status"]
}
}
}