Skip to content

Commit 0f13c01

Browse files
docs: init rest api docs with components description
1 parent 823872d commit 0f13c01

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

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

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
openapi: 3.0.0
2+
servers:
3+
- description: Building Management microservice
4+
url: http://localhost:<port>/api
5+
info:
6+
description: This is the API of the Building Management microservice within the Smart Operating Block project
7+
version: "0.1.0"
8+
title: Building Management API
9+
contact:
10+
11+
license:
12+
name: MIT License
13+
url: 'https://opensource.org/license/mit/'
14+
15+
paths:
16+
17+
18+
components:
19+
schemas:
20+
Room:
21+
type: object
22+
properties:
23+
id:
24+
type: string
25+
example: Room-#1
26+
name:
27+
type: string
28+
example: Mario Rossi's Operating Room - Bufalini Hospital
29+
zone-id:
30+
type: string
31+
example: Zone-#1
32+
type:
33+
type: string
34+
enum: [operating-room, pre-operating-room]
35+
example: operating-room
36+
environmental-data:
37+
$ref: '#/components/schemas/RoomEnvironmentalData'
38+
39+
RoomEnvironmentalData:
40+
type: object
41+
properties:
42+
temperature:
43+
type: object
44+
properties:
45+
value:
46+
type: number
47+
example: 25.3
48+
unit:
49+
type: string
50+
enum: [celsius, fahrenheit]
51+
example: celsius
52+
humidity:
53+
type: number
54+
example: 55.5
55+
luminosity:
56+
type: object
57+
properties:
58+
value:
59+
type: number
60+
example: 150.5
61+
unit:
62+
type: string
63+
enum: [lux]
64+
example: lux
65+
presence:
66+
type: boolean
67+
example: true
68+
69+
MedicalTechnology:
70+
type: object
71+
properties:
72+
id:
73+
type: string
74+
example: mt-#1
75+
name:
76+
type: string
77+
example: Endoscope
78+
description:
79+
type: string
80+
room-id:
81+
type: string
82+
example: Room-#1
83+
type:
84+
type: string
85+
enum: [endoscope, xray]
86+
example: endoscope

0 commit comments

Comments
 (0)