-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenapi.yaml
87 lines (87 loc) · 2.58 KB
/
openapi.yaml
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
openapi: 3.0.1
info:
description: APIs provided for a single room in the [meeting-mood](https://github.com/geeksforsocialchange/meeting-mood) application. These APIs are how the frontend interacts with the backend, and are documented here to help with testing.
version: 0.3.0
title: meeting-mood
paths:
'/all':
get:
summary: 'list all user moods from the room'
responses:
'200':
description: a list of users and moods for the room
content:
application/json:
examples:
list:
value: >-
[{"roomUser":"123Bob","username":"Bob","mood":"Agree","room":"123"}]
default:
description: When no room moods exist
content:
text/plain; charset=utf-8:
examples:
none:
value: |
null
'/mood':
post:
summary: submit a user's mood to the room
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: "Alice"
mood:
type: string
enum: ["Agree","Agree and volunteer","Veto","Stand aside","Language","Speak up","Slow down","I'm confused", "Response","Direct response","Technical point",]
room:
type: string
example: '12345'
roomUser:
type: string
example: '12345Alice'
responses:
'200':
description: successfully posted
'418':
description: JSON parsing failed
'/delete':
post:
summary: delete a user's mood from the room
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
type: string
example: "Alice"
roomUser:
type: string
example: '12345Alice'
responses:
'200':
description: successfully deleted
'418':
description: JSON parsing failed
'/ws':
summary: a websocket streaming updates for the room
get:
summary: 'subscribe to the websocket'
responses:
'200':
description: subscribe to the websocket
servers:
- url: '/{room}'
variables:
room:
default: '12345'
description: room number