-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.yaml
More file actions
296 lines (295 loc) · 9.97 KB
/
openapi.yaml
File metadata and controls
296 lines (295 loc) · 9.97 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
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
openapi: 3.0.3
info:
title: CoderDojo Zen API
description: This is a sample server for a pet store.
termsOfService: http://example.com/terms/
contact:
name: API Support
url: http://www.example.com/support
email: support@example.com
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: 1.0.0
externalDocs:
description: Find out more about this API
url: http://api.coderdojokinsale.com
servers:
- url: https://api.coderdojokinsale.com/v1
description: Remote
- url: http://localhost:8080
description: Local
paths:
/awards:
$ref: ./award-service/src/main/resources/openapi.yaml#/paths/~1awards
/awards/{id}:
$ref: ./award-service/src/main/resources/openapi.yaml#/paths/~1awards~1{id}
/badges:
$ref: ./badge-service/src/main/resources/openapi.yaml#/paths/~1badges
/badges/{id}:
$ref: ./badge-service/src/main/resources/openapi.yaml#/paths/~1badges~1{id}
/belts:
$ref: ./belt-service/src/main/resources/openapi.yaml#/paths/~1belts
/belts/{id}:
$ref: ./belt-service/src/main/resources/openapi.yaml#/paths/~1belts~1{id}
/dojos:
$ref: ./dojo-service/src/main/resources/openapi.yaml#/paths/~1dojos
/dojos/{id}:
$ref: ./dojo-service/src/main/resources/openapi.yaml#/paths/~1dojos~1{id}
/events:
$ref: ./event-service/src/main/resources/openapi.yaml#/paths/~1events
/events/{id}:
$ref: ./event-service/src/main/resources/openapi.yaml#/paths/~1events~1{id}
/users:
$ref: ./user-service/src/main/resources/openapi.yaml#/paths/~1users
/users/{id}:
$ref: ./user-service/src/main/resources/openapi.yaml#/paths/~1users~1{id}
components:
schemas:
Error:
type: object
properties:
description:
type: string
Errors:
type: array
items:
$ref: '#/components/schemas/Error'
Light:
type: object
properties:
state:
$ref: '#/components/schemas/State'
swupdate:
$ref: '#/components/schemas/SwUpdate'
type:
description: A fixed name describing the type of light e.g. “Extended color light”.
type: string
name:
description: A unique, editable name given to the light.
type: string
modelid:
description: The hardware model of the light.
type: string
manufacturername:
description: The manufacturer name.
type: string
productname:
type: string
cababilities:
$ref: '#/components/schemas/Capabilities'
config:
$ref: '#/components/schemas/Config'
uniqueid:
description: 'Unique id of the device. The MAC address of the device with a unique endpoint id in the form: AA:BB:CC:DD:EE:FF:00:11-XX'
type: string
swversion:
description: An identifier for the software version running on the light.
type: string
State:
description: Details the state of the light, see the state table below for more details.
type: object
properties:
on:
description: On/Off state of the light. On=true, Off=false
type: boolean
bri:
description: Brightness of the light. This is a scale from the minimum brightness the light is capable of, 1, to the maximum capable brightness, 254.
type: integer
minimum: 1
maximum: 254
hue:
description: Hue of the light. This is a wrapping value between 0 and 65535. Note, that hue/sat values are hardware dependent which means that programming two devices with the same value does not garantuee that they will be the same color. Programming 0 and 65535 would mean that the light will resemble the color red, 21845 for green and 43690 for blue.
type: integer
minimum: 0
maximum: 65535
sat:
description: Saturation of the light. 254 is the most saturated (colored) and 0 is the least saturated (white).
type: integer
minimum: 0
maximum: 254
effect:
description: The dynamic effect of the light, can either be “none” or “colorloop”.If set to colorloop, the light will cycle through all hues using the current brightness and saturation settings.
type: string
enum:
- "none"
- "colorloop"
xy:
description: 'The x and y coordinates of a color in CIE color space. The first entry is the x coordinate and the second entry is the y coordinate. Both x and y are between 0 and 1. Using CIE xy, the colors can be the same on all lamps if the coordinates are within every lamps gamuts (example: “xy”:[0.409,0.5179] is the same color on all lamps). If not, the lamp will calculate it’s closest color and use that. The CIE xy color is absolute, independent from the hardware.'
type: integer
format: float
minimum: 0
maximum: 1
ct:
description: The Mired Color temperature of the light. 2012 connected lights are capable of 153 (6500K) to 500 (2000K).
type: integer
minimum: 153
maximum: 500
alert:
description: 'The alert effect, which is a temporary change to the bulb’s state. This can take one of the following values: “none” – The light is not performing an alert effect. “select” – The light is performing one breathe cycle. “lselect” – The light is performing breathe cycles for 15 seconds or until an "alert": "none" command is received.Note that this contains the last alert sent to the light and not its current state. i.e. After the breathe cycle has finished the bridge does not reset the alert to “none“.'
type: string
enum:
- "none"
- "select"
- "lselect"
colormode:
description: Indicates the color mode in which the light is working, this is the last command type it received. Values are “hs” for Hue and Saturation, “xy” for XY and “ct” for Color Temperature. This parameter is only present when the light supports at least one of the values.
type: string
enum:
- "hs"
- "xy"
- "ct"
mode:
type: string
reachable:
description: Indicates if a light can be reached by the bridge.
type: boolean
Capabilities:
type: object
properties:
certified:
type: boolean
control:
$ref: '#/components/schemas/Capabilities'
Control:
type: object
properties:
mindimlevel:
type: integer
maxlumen:
type: integer
ct:
type: object
properties:
min:
type: integer
max:
type: integer
Streaming:
description: Current light supports streaming features
type: object
properties:
renderer:
description: Indicates if a lamp can be used for entertainment streaming as renderer
type: boolean
proxy:
description: Indicates if a lamp can be used for entertainment streaming as a proxy node
type: boolean
Config:
type: object
properties:
archetype:
type: string
function:
type: string
direction:
type: string
startup:
type: object
properties:
mode:
type: string
configured:
type: boolean
SwUpdate:
type: object
properties:
state:
type: string
lastinstall:
type: string
Success:
type: object
properties:
success:
type: object
properties:
/lights:
type: string
parameters:
Username:
name: username
required: true
in: path
description: ID of the resource
schema:
type: string
example: 9vwVI-K-x8m8vlOcXo9NbJy27cgEOi6CfeDGy7Qw
Element:
name: element
required: true
in: path
description: ID of the resource
schema:
type: string
ResourceType:
name: resourcetype
required: true
in: path
description: ID of the resource
schema:
type: string
ID:
name: id
required: true
in: path
description: ID of the resource
schema:
type: string
Resource:
name: resource
required: true
in: path
description: ID of the resource
schema:
type: string
enum:
- lights
- sensors
- groups
- scenes
- schedules
- rules
- timezones
- streaming
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
tags:
- name: Authentication
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Awards
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Badges
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Belts
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Dojos
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Events
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/
- name: Users
description: A sample description for this `Tag Object`
externalDocs:
description: External Documentation
url: http://www.example.com/