Skip to content

Commit facc278

Browse files
docs(rest-api): add room api documentation
1 parent 0f13c01 commit facc278

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

docs/rest-api/rest-api-docs.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,76 @@ info:
1313
url: 'https://opensource.org/license/mit/'
1414

1515
paths:
16+
/rooms:
17+
post:
18+
summary: insert a new room
19+
operationId: insertRoom
20+
description: Add new room to the operating block
21+
responses:
22+
'201':
23+
description: room created
24+
'400':
25+
description: invalid input, object invalid
26+
'409':
27+
description: a room with the same id already exists
28+
'500':
29+
description: server error occurred
30+
requestBody:
31+
content:
32+
application/json:
33+
schema:
34+
$ref: '#/components/schemas/Room'
35+
description: Room to add
1636

37+
/rooms/{room-id}:
38+
get:
39+
summary: get the room information
40+
operationId: getRoom
41+
description: Get room information
42+
parameters:
43+
- in: path
44+
name: room-id
45+
description: the room's ID
46+
required: true
47+
schema:
48+
type: string
49+
- in: query
50+
name: dateTime
51+
required: false
52+
description: Specify a past date in order to obtain historical data
53+
schema:
54+
type: string
55+
format: date-time
56+
example: '2017-07-21T17:32:28Z'
57+
responses:
58+
'200':
59+
description: search result
60+
content:
61+
application/json:
62+
schema:
63+
$ref: '#/components/schemas/Room'
64+
'404':
65+
description: room not found
66+
'500':
67+
description: server error occurred
68+
delete:
69+
summary: delete the room
70+
operationId: deleteRoom
71+
description: Delete a room
72+
parameters:
73+
- in: path
74+
name: room-id
75+
description: the room's ID
76+
required: true
77+
schema:
78+
type: string
79+
responses:
80+
'204':
81+
description: room deleted
82+
'404':
83+
description: room not found
84+
'500':
85+
description: server error occurred
1786

1887
components:
1988
schemas:
@@ -77,6 +146,8 @@ components:
77146
example: Endoscope
78147
description:
79148
type: string
149+
in-use:
150+
type: boolean
80151
room-id:
81152
type: string
82153
example: Room-#1

0 commit comments

Comments
 (0)