|
13 | 13 | url: 'https://opensource.org/license/mit/'
|
14 | 14 |
|
15 | 15 | 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 |
16 | 36 |
|
| 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 |
17 | 86 |
|
18 | 87 | components:
|
19 | 88 | schemas:
|
@@ -77,6 +146,8 @@ components:
|
77 | 146 | example: Endoscope
|
78 | 147 | description:
|
79 | 148 | type: string
|
| 149 | + in-use: |
| 150 | + type: boolean |
80 | 151 | room-id:
|
81 | 152 | type: string
|
82 | 153 | example: Room-#1
|
|
0 commit comments