-
Notifications
You must be signed in to change notification settings - Fork 1
/
asyncapi.yml
339 lines (334 loc) · 8.75 KB
/
asyncapi.yml
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
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
asyncapi: 2.5.0
info:
title: Smart Pointer Internal API
version: 1.1.0
servers:
local:
url: localhost:8080
description: ローカル環境
protocol: STOMP
dev:
url: smartpointer.abelab.de
description: 開発環境
protocol: STOMP
prod:
url: smartpointer-prod.an.r.appspot.com
description: 本番環境
protocol: STOMP
channels:
/app/rooms/{room_id}/timer/start:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: タイマー開始トピック
message:
$ref: "#/components/messages/startTimer"
/app/rooms/{room_id}/timer/resume:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: タイマー再開トピック
message:
$ref: "#/components/messages/resumeTimer"
/app/rooms/{room_id}/timer/stop:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: タイマー停止トピック
message:
$ref: "#/components/messages/stopTimer"
/app/rooms/{room_id}/timer/reset:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: タイマーリセットトピック
message:
$ref: "#/components/messages/resetTimer"
/app/rooms/{room_id}/slides/next:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: スライドを進めるトピック
message:
$ref: "#/components/messages/goNextSlide"
/app/rooms/{room_id}/slides/previous:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: スライドを戻すトピック
message:
$ref: "#/components/messages/goPreviousSlide"
/app/rooms/{room_id}/pointer/control:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: ポインター操作トピック
message:
$ref: "#/components/messages/controlPointer"
/app/rooms/{room_id}/pointer/disconnect:
parameters:
room_id:
description: ルームID
schema:
type: string
publish:
description: ポインター切断トピック
message:
$ref: "#/components/messages/disconnectPointer"
/topic/rooms/{room_id}/timer:
parameters:
room_id:
description: ルームID
schema:
type: string
subscribe:
description: タイマー購読トピック
message:
$ref: "#/components/messages/broadcastTimer"
/topic/rooms/{room_id}/users:
parameters:
room_id:
description: ルームID
schema:
type: string
subscribe:
description: ユーザリスト購読トピック
message:
$ref: "#/components/messages/broadcastUsers"
/topic/rooms/{room_id}/slides/control:
parameters:
room_id:
description: ルームID
schema:
type: string
subscribe:
description: スライド操作購読トピック
message:
$ref: "#/components/messages/broadcastSlideControl"
/topic/rooms/{room_id}/pointer/control:
parameters:
room_id:
description: ルームID
schema:
type: string
subscribe:
description: ポインター操作購読トピック
message:
$ref: "#/components/messages/broadcastPointerControl"
/topic/exception:
subscribe:
description: 例外購読トピック
message:
$ref: "#/components/messages/broadcastException"
components:
messages:
startTimer:
description: READY状態のタイマーを開始する
payload:
$ref: "#/components/schemas/TimerStartRequest"
resumeTimer:
description: READY状態のタイマーを再開する
payload:
$ref: "#/components/schemas/TimerResumeRequest"
stopTimer:
description: RUNNING状態のタイマーを停止する
resetTimer:
description: タイマーをリセットする
goNextSlide:
description: スライドを次ページへ進める
goPreviousSlide:
description: スライドを前ページへ戻す
controlPointer:
description: ポインターを操作する
payload:
$ref: "#/components/schemas/PointerControlRequest"
disconnectPointer:
description: ポインターを切断する
broadcastTimer:
description: タイマーを配信する
payload:
$ref: "#/components/schemas/TimerResponse"
broadcastUsers:
description: ユーザリストを配信する
payload:
$ref: "#/components/schemas/UsersResponse"
broadcastSlideControl:
description: スライド操作を配信する
payload:
$ref: "#/components/schemas/SlideControlResponse"
broadcastPointerControl:
description: ポインター操作を配信する
payload:
$ref: "#/components/schemas/PointerControlResponse"
broadcastException:
description: 例外を配信する
payload:
$ref: "#/components/schemas/ErrorResponse"
schemas:
TimerStartRequest:
description: タイマー開始リクエスト
type: object
properties:
value:
description: 設定時間[s]
type: integer
minimum: 1
required:
- value
TimerResumeRequest:
description: タイマー再開リクエスト
type: object
properties:
value:
description: 残り時間[s]
type: integer
minimum: 1
required:
- value
PointerControlRequest:
description: ポインター操作リクエスト
type: object
properties:
alpha:
description: α値
type: number
beta:
description: β値
type: number
gamma:
description: γ値
type: number
required:
- alpha
- beta
- gamma
UserResponse:
description: ユーザレスポンス
type: object
properties:
id:
description: ユーザID
type: string
name:
description: ユーザ名
type: string
required:
- id
- name
UsersResponse:
description: ユーザリストレスポンス
type: object
properties:
users:
description: ユーザリスト
type: array
$ref: "#/components/schemas/UserResponse"
required:
- users
TimerResponse:
description: タイマーレスポンス
type: object
properties:
status:
description: ステータスID
type: integer
enum:
- 0
- 1
value:
description: 残り時間[s]
type: integer
minimum: 1
nullable: true
finishAt:
description: 終了日時
type: string
format: yyyy-MM-dd'T'HH:mm:ss
nullable: true
required:
- status
- value
- finishAt
SlideControlResponse:
description: スライド操作レスポンス
type: object
properties:
control:
description: 操作ID
type: integer
enum:
- 0
- 1
required:
- control
PointerControlResponse:
description: ポインター操作レスポンス
type: object
properties:
user:
description: ユーザ
type: object
$ref: "#/components/schemas/UserResponse"
isActive:
description: ポインターがアクティブかどうか
type: boolean
rotation:
description: 回転数
type: object
nullable: true
$ref: "#/components/schemas/PointerRotationResponse"
required:
- user
- enabled
- rotation
PointerRotationResponse:
description: ポインター回転数レスポンス
type: object
properties:
alpha:
description: α値
type: number
beta:
description: β値
type: number
gamma:
description: γ値
type: number
required:
- alpha
- beta
- gamma
ErrorResponse:
description: エラーレスポンス
type: object
properties:
code:
description: エラーコード
type: integer
message:
description: エラーメッセージ
type: string
required:
- code
- message