1
+ openapi : 3.0.2
2
+ info :
3
+ description : This API provides Hotel/motel/ Accomodation list
4
+ version : 0.1.0
5
+ title : Accomodation List API
6
+ contact :
7
+
8
+ license :
9
+ name : Apache 2.0
10
+ url : ' http://www.apache.org/licenses/LICENSE-2.0.html'
11
+ tags :
12
+ - name : contributors
13
+ description : Secured write permission calls
14
+ - name : developers
15
+ description : Operations available to regular developers
16
+ paths :
17
+ /acomodations :
18
+ get :
19
+ tags :
20
+ - developers
21
+ summary : searches accomodations
22
+ operationId : searchAccomodations
23
+ description : |
24
+ By passing in the appropriate options, you can search for
25
+ available accomodations in the system
26
+ parameters :
27
+ - in : query
28
+ name : searchString
29
+ description : pass an optional search string for looking up accomodations
30
+ required : false
31
+ schema :
32
+ type : string
33
+ - in : query
34
+ name : skip
35
+ description : number of records to skip for pagination
36
+ schema :
37
+ type : integer
38
+ format : int32
39
+ minimum : 0
40
+ - in : query
41
+ name : limit
42
+ description : maximum number of records to return
43
+ schema :
44
+ type : integer
45
+ format : int32
46
+ minimum : 0
47
+ maximum : 50
48
+ responses :
49
+ ' 200 ' :
50
+ description : search results matching criteria
51
+ content :
52
+ application/json :
53
+ schema :
54
+ type : array
55
+ items :
56
+ $ref : ' #/components/schemas/AccomodationItem'
57
+ ' 400 ' :
58
+ description : bad input parameter
59
+ post :
60
+ tags :
61
+ - contributors
62
+ summary : adds am accomodation item
63
+ operationId : addAccomodation
64
+ description : Adds an item to the system
65
+ responses :
66
+ ' 201 ' :
67
+ description : item created
68
+ ' 400 ' :
69
+ description : ' invalid input, object invalid'
70
+ ' 409 ' :
71
+ description : an existing item already exists
72
+ requestBody :
73
+ content :
74
+ application/json :
75
+ schema :
76
+ $ref : ' #/components/schemas/AccomodationItem'
77
+ description : Accomodation item to add
78
+ put :
79
+ tags :
80
+ - contributors
81
+ summary : suspend am accomodation item
82
+ operationId : suspendAccomodation
83
+ description : suspend an item to the system
84
+ responses :
85
+ ' 201 ' :
86
+ description : item suspended
87
+ ' 400 ' :
88
+ description : ' invalid input, object invalid'
89
+ ' 403 ' :
90
+ description : ' forbidden'
91
+ ' 404 ' :
92
+ description : ' not found'
93
+ requestBody :
94
+ content :
95
+ application/json :
96
+ schema :
97
+ $ref : ' validations.yaml#/components/schemas/SuspendItem'
98
+ servers :
99
+ - url : ' https://virtserver.swaggerhub.com/wuhan2020/accomodations/0.1.0'
100
+ components :
101
+ schemas :
102
+ AccomodationItem :
103
+ type : object
104
+ required :
105
+ - id
106
+ - name
107
+ - address
108
+ - volume
109
+ - supporttype
110
+ - contact
111
+ - validation
112
+ properties :
113
+ id :
114
+ type : string
115
+ format : uuid
116
+ example : d290f1ee-6c54-4b01-90e6-d701748f0851
117
+ name :
118
+ type : string
119
+ example : 第一大酒店
120
+ address :
121
+ type : string
122
+ example : 湖北省武汉市靖江大街12号 第一大酒店
123
+ supporttype :
124
+ type : string
125
+ enum : ['医护人员','运输司机','需隔离观察人员','支援人员','外出滞留人员']
126
+ contact :
127
+ $ref : ' validations.yaml#/components/schemas/Contact'
128
+ validation :
129
+ $ref : ' validations.yaml#/components/schemas/ValidationItem'
130
+ volume :
131
+ type : object
132
+ required :
133
+ - totalPpl
134
+ properties :
135
+ totalPpl :
136
+ type : integer
137
+ format : int32
138
+ example : 55
139
+ description : 共可接纳55人
140
+ rooms :
141
+ type : array
142
+ items :
143
+ type : object
144
+ required :
145
+ - number
146
+ - room
147
+ properties :
148
+ number :
149
+ type : integer
150
+ format : int32
151
+ example : 5
152
+ description : 5间
153
+ room :
154
+ $ref : ' #/components/schemas/AccomodationRoom'
155
+ releaseDate :
156
+ type : string
157
+ format : date-time
158
+ example : ' 2016-08-29T09:12:33.001Z'
159
+ availableState :
160
+ oneOf :
161
+ - type : boolean
162
+ default : true
163
+ - $ref : ' validations.yaml#/components/schemas/SuspendItem'
164
+ AccomodationRoom :
165
+ type : object
166
+ required :
167
+ - ppl
168
+ properties :
169
+ ppl :
170
+ type : integer
171
+ format : int32
172
+ example : 2
173
+ description : 2个人
174
+ space :
175
+ type : number
176
+ format : float
177
+ example : 5.2
178
+ description : 5.2 平方米
179
+ roomtype :
180
+ type : string
181
+ enum : ['双人间','多人间','标准间','套房','豪华套房','总统套房']
0 commit comments