Lines 74-83
Link Here
|
74 |
} |
74 |
} |
75 |
} |
75 |
} |
76 |
}, |
76 |
}, |
77 |
"/reserves": { |
77 |
"/holds": { |
78 |
"get": { |
78 |
"get": { |
79 |
"operationId": "listReserves", |
79 |
"operationId": "listHolds", |
80 |
"tags": ["borrowers", "reserves"], |
80 |
"tags": ["borrowers", "holds"], |
81 |
"parameters": [ |
81 |
"parameters": [ |
82 |
{ |
82 |
{ |
83 |
"name": "borrowernumber", |
83 |
"name": "borrowernumber", |
Lines 90-97
Link Here
|
90 |
"produces": ["application/json"], |
90 |
"produces": ["application/json"], |
91 |
"responses": { |
91 |
"responses": { |
92 |
"200": { |
92 |
"200": { |
93 |
"description": "A list of reserves", |
93 |
"description": "A list of holds", |
94 |
"schema": { "$ref": "#/definitions/reserves" } |
94 |
"schema": { "$ref": "#/definitions/holds" } |
95 |
}, |
95 |
}, |
96 |
"404": { |
96 |
"404": { |
97 |
"description": "Borrower not found", |
97 |
"description": "Borrower not found", |
Lines 100-112
Link Here
|
100 |
} |
100 |
} |
101 |
}, |
101 |
}, |
102 |
"post": { |
102 |
"post": { |
103 |
"operationId": "addReserve", |
103 |
"operationId": "addHold", |
104 |
"tags": ["borrowers", "reserves"], |
104 |
"tags": ["borrowers", "holds"], |
105 |
"parameters": [ |
105 |
"parameters": [ |
106 |
{ |
106 |
{ |
107 |
"name": "body", |
107 |
"name": "body", |
108 |
"in": "body", |
108 |
"in": "body", |
109 |
"description": "A JSON object containing informations about the new reserve", |
109 |
"description": "A JSON object containing informations about the new hold", |
110 |
"required": true, |
110 |
"required": true, |
111 |
"schema": { |
111 |
"schema": { |
112 |
"type": "object", |
112 |
"type": "object", |
Lines 128-134
Link Here
|
128 |
"type": "string" |
128 |
"type": "string" |
129 |
}, |
129 |
}, |
130 |
"expirationdate": { |
130 |
"expirationdate": { |
131 |
"description": "Reserve end date", |
131 |
"description": "Hold end date", |
132 |
"type": "string", |
132 |
"type": "string", |
133 |
"format": "date" |
133 |
"format": "date" |
134 |
} |
134 |
} |
Lines 140-154
Link Here
|
140 |
"produces": ["application/json"], |
140 |
"produces": ["application/json"], |
141 |
"responses": { |
141 |
"responses": { |
142 |
"201": { |
142 |
"201": { |
143 |
"description": "Created reserve", |
143 |
"description": "Created hold", |
144 |
"schema": { "$ref": "#/definitions/reserve" } |
144 |
"schema": { "$ref": "#/definitions/hold" } |
145 |
}, |
145 |
}, |
146 |
"400": { |
146 |
"400": { |
147 |
"description": "Missing or wrong parameters", |
147 |
"description": "Missing or wrong parameters", |
148 |
"schema": { "$ref": "#/definitions/error" } |
148 |
"schema": { "$ref": "#/definitions/error" } |
149 |
}, |
149 |
}, |
150 |
"403": { |
150 |
"403": { |
151 |
"description": "Reserve not allowed", |
151 |
"description": "Hold not allowed", |
152 |
"schema": { "$ref": "#/definitions/error" } |
152 |
"schema": { "$ref": "#/definitions/error" } |
153 |
}, |
153 |
}, |
154 |
"404": { |
154 |
"404": { |
Lines 162-173
Link Here
|
162 |
} |
162 |
} |
163 |
} |
163 |
} |
164 |
}, |
164 |
}, |
165 |
"/reserves/{reserve_id}": { |
165 |
"/holds/{reserve_id}": { |
166 |
"put": { |
166 |
"put": { |
167 |
"operationId": "editReserve", |
167 |
"operationId": "editHold", |
168 |
"tags": ["reserves"], |
168 |
"tags": ["holds"], |
169 |
"parameters": [ |
169 |
"parameters": [ |
170 |
{ "$ref": "#/parameters/reserveIdPathParam" }, |
170 |
{ "$ref": "#/parameters/holdIdPathParam" }, |
171 |
{ |
171 |
{ |
172 |
"name": "body", |
172 |
"name": "body", |
173 |
"in": "body", |
173 |
"in": "body", |
Lines 198-221
Link Here
|
198 |
"produces": ["application/json"], |
198 |
"produces": ["application/json"], |
199 |
"responses": { |
199 |
"responses": { |
200 |
"200": { |
200 |
"200": { |
201 |
"description": "Updated reserve", |
201 |
"description": "Updated hold", |
202 |
"schema": { "$ref": "#/definitions/reserve" } |
202 |
"schema": { "$ref": "#/definitions/hold" } |
203 |
}, |
203 |
}, |
204 |
"400": { |
204 |
"400": { |
205 |
"description": "Missing or wrong parameters", |
205 |
"description": "Missing or wrong parameters", |
206 |
"schema": { "$ref": "#/definitions/error" } |
206 |
"schema": { "$ref": "#/definitions/error" } |
207 |
}, |
207 |
}, |
208 |
"404": { |
208 |
"404": { |
209 |
"description": "Reserve not found", |
209 |
"description": "Hold not found", |
210 |
"schema": { "$ref": "#/definitions/error" } |
210 |
"schema": { "$ref": "#/definitions/error" } |
211 |
} |
211 |
} |
212 |
} |
212 |
} |
213 |
}, |
213 |
}, |
214 |
"delete": { |
214 |
"delete": { |
215 |
"operationId": "deleteReserve", |
215 |
"operationId": "deleteHold", |
216 |
"tags": ["reserves"], |
216 |
"tags": ["holds"], |
217 |
"parameters": [ |
217 |
"parameters": [ |
218 |
{ "$ref": "#/parameters/reserveIdPathParam" } |
218 |
{ "$ref": "#/parameters/holdIdPathParam" } |
219 |
], |
219 |
], |
220 |
"produces": ["application/json"], |
220 |
"produces": ["application/json"], |
221 |
"responses": { |
221 |
"responses": { |
Lines 226-232
Link Here
|
226 |
} |
226 |
} |
227 |
}, |
227 |
}, |
228 |
"404": { |
228 |
"404": { |
229 |
"description": "Reserve not found", |
229 |
"description": "Hold not found", |
230 |
"schema": { "$ref": "#/definitions/error" } |
230 |
"schema": { "$ref": "#/definitions/error" } |
231 |
} |
231 |
} |
232 |
} |
232 |
} |
Lines 244-253
Link Here
|
244 |
"required": true, |
244 |
"required": true, |
245 |
"type": "integer" |
245 |
"type": "integer" |
246 |
}, |
246 |
}, |
247 |
"reserveIdPathParam": { |
247 |
"holdIdPathParam": { |
248 |
"name": "reserve_id", |
248 |
"name": "reserve_id", |
249 |
"in": "path", |
249 |
"in": "path", |
250 |
"description": "Internal reserve identifier", |
250 |
"description": "Internal hold identifier", |
251 |
"required": true, |
251 |
"required": true, |
252 |
"type": "integer" |
252 |
"type": "integer" |
253 |
} |
253 |
} |