|
Lines 3-37
Link Here
|
| 3 |
"get": { |
3 |
"get": { |
| 4 |
"x-mojo-to": "Cities#list", |
4 |
"x-mojo-to": "Cities#list", |
| 5 |
"operationId": "listCities", |
5 |
"operationId": "listCities", |
| 6 |
"tags": ["cities"], |
6 |
"tags": [ |
|
|
7 |
"cities" |
| 8 |
], |
| 7 |
"produces": [ |
9 |
"produces": [ |
| 8 |
"application/json" |
10 |
"application/json" |
| 9 |
], |
11 |
], |
| 10 |
"parameters": [{ |
12 |
"parameters": [ |
| 11 |
"name": "name", |
13 |
{ |
| 12 |
"in": "query", |
14 |
"name": "name", |
| 13 |
"description": "Case insensative search on city name", |
15 |
"in": "query", |
| 14 |
"required": false, |
16 |
"description": "Case insensative search on city name", |
| 15 |
"type": "string" |
17 |
"required": false, |
| 16 |
}, { |
18 |
"type": "string" |
| 17 |
"name": "state", |
19 |
}, |
| 18 |
"in": "query", |
20 |
{ |
| 19 |
"description": "Case insensative search on city state", |
21 |
"name": "state", |
| 20 |
"required": false, |
22 |
"in": "query", |
| 21 |
"type": "string" |
23 |
"description": "Case insensative search on city state", |
| 22 |
}, { |
24 |
"required": false, |
| 23 |
"name": "country", |
25 |
"type": "string" |
| 24 |
"in": "query", |
26 |
}, |
| 25 |
"description": "Case insensative search on city country", |
27 |
{ |
| 26 |
"required": false, |
28 |
"name": "country", |
| 27 |
"type": "string" |
29 |
"in": "query", |
| 28 |
}, { |
30 |
"description": "Case insensative search on city country", |
| 29 |
"name": "postal_code", |
31 |
"required": false, |
| 30 |
"in": "query", |
32 |
"type": "string" |
| 31 |
"description": "Case Insensative search on city postal code", |
33 |
}, |
| 32 |
"required": false, |
34 |
{ |
| 33 |
"type": "string" |
35 |
"name": "postal_code", |
| 34 |
}], |
36 |
"in": "query", |
|
|
37 |
"description": "Case Insensative search on city postal code", |
| 38 |
"required": false, |
| 39 |
"type": "string" |
| 40 |
}, |
| 41 |
{ |
| 42 |
"$ref": "../parameters.json#/match" |
| 43 |
}, |
| 44 |
{ |
| 45 |
"$ref": "../parameters.json#/order_by" |
| 46 |
}, |
| 47 |
{ |
| 48 |
"$ref": "../parameters.json#/page" |
| 49 |
}, |
| 50 |
{ |
| 51 |
"$ref": "../parameters.json#/per_page" |
| 52 |
}, |
| 53 |
{ |
| 54 |
"$ref": "../parameters.json#/q_param" |
| 55 |
}, |
| 56 |
{ |
| 57 |
"$ref": "../parameters.json#/q_body" |
| 58 |
}, |
| 59 |
{ |
| 60 |
"$ref": "../parameters.json#/q_header" |
| 61 |
} |
| 62 |
], |
| 35 |
"responses": { |
63 |
"responses": { |
| 36 |
"200": { |
64 |
"200": { |
| 37 |
"description": "A list of cities", |
65 |
"description": "A list of cities", |
|
Lines 63-85
Link Here
|
| 63 |
}, |
91 |
}, |
| 64 |
"x-koha-authorization": { |
92 |
"x-koha-authorization": { |
| 65 |
"permissions": { |
93 |
"permissions": { |
| 66 |
"catalogue": "1" |
94 |
"catalogue": "1" |
| 67 |
} |
95 |
} |
| 68 |
} |
96 |
} |
| 69 |
}, |
97 |
}, |
| 70 |
"post": { |
98 |
"post": { |
| 71 |
"x-mojo-to": "Cities#add", |
99 |
"x-mojo-to": "Cities#add", |
| 72 |
"operationId": "addCity", |
100 |
"operationId": "addCity", |
| 73 |
"tags": ["cities"], |
101 |
"tags": [ |
| 74 |
"parameters": [{ |
102 |
"cities" |
| 75 |
"name": "body", |
103 |
], |
| 76 |
"in": "body", |
104 |
"parameters": [ |
| 77 |
"description": "A JSON object containing informations about the new hold", |
105 |
{ |
| 78 |
"required": true, |
106 |
"name": "body", |
| 79 |
"schema": { |
107 |
"in": "body", |
| 80 |
"$ref": "../definitions.json#/city" |
108 |
"description": "A JSON object containing informations about the new hold", |
|
|
109 |
"required": true, |
| 110 |
"schema": { |
| 111 |
"$ref": "../definitions.json#/city" |
| 112 |
} |
| 81 |
} |
113 |
} |
| 82 |
}], |
114 |
], |
| 83 |
"produces": [ |
115 |
"produces": [ |
| 84 |
"application/json" |
116 |
"application/json" |
| 85 |
], |
117 |
], |
|
Lines 126-135
Link Here
|
| 126 |
"get": { |
158 |
"get": { |
| 127 |
"x-mojo-to": "Cities#get", |
159 |
"x-mojo-to": "Cities#get", |
| 128 |
"operationId": "getCity", |
160 |
"operationId": "getCity", |
| 129 |
"tags": ["cities"], |
161 |
"tags": [ |
| 130 |
"parameters": [{ |
162 |
"cities" |
| 131 |
"$ref": "../parameters.json#/city_id_pp" |
163 |
], |
| 132 |
}], |
164 |
"parameters": [ |
|
|
165 |
{ |
| 166 |
"$ref": "../parameters.json#/city_id_pp" |
| 167 |
} |
| 168 |
], |
| 133 |
"produces": [ |
169 |
"produces": [ |
| 134 |
"application/json" |
170 |
"application/json" |
| 135 |
], |
171 |
], |
|
Lines 161-185
Link Here
|
| 161 |
}, |
197 |
}, |
| 162 |
"x-koha-authorization": { |
198 |
"x-koha-authorization": { |
| 163 |
"permissions": { |
199 |
"permissions": { |
| 164 |
"catalogue": "1" |
200 |
"catalogue": "1" |
| 165 |
} |
201 |
} |
| 166 |
} |
202 |
} |
| 167 |
}, |
203 |
}, |
| 168 |
"put": { |
204 |
"put": { |
| 169 |
"x-mojo-to": "Cities#update", |
205 |
"x-mojo-to": "Cities#update", |
| 170 |
"operationId": "updateCity", |
206 |
"operationId": "updateCity", |
| 171 |
"tags": ["cities"], |
207 |
"tags": [ |
| 172 |
"parameters": [{ |
208 |
"cities" |
| 173 |
"$ref": "../parameters.json#/city_id_pp" |
209 |
], |
| 174 |
}, { |
210 |
"parameters": [ |
| 175 |
"name": "body", |
211 |
{ |
| 176 |
"in": "body", |
212 |
"$ref": "../parameters.json#/city_id_pp" |
| 177 |
"description": "A city object", |
213 |
}, |
| 178 |
"required": true, |
214 |
{ |
| 179 |
"schema": { |
215 |
"name": "body", |
| 180 |
"$ref": "../definitions.json#/city" |
216 |
"in": "body", |
|
|
217 |
"description": "A city object", |
| 218 |
"required": true, |
| 219 |
"schema": { |
| 220 |
"$ref": "../definitions.json#/city" |
| 221 |
} |
| 181 |
} |
222 |
} |
| 182 |
}], |
223 |
], |
| 183 |
"produces": [ |
224 |
"produces": [ |
| 184 |
"application/json" |
225 |
"application/json" |
| 185 |
], |
226 |
], |
|
Lines 230-239
Link Here
|
| 230 |
"delete": { |
271 |
"delete": { |
| 231 |
"x-mojo-to": "Cities#delete", |
272 |
"x-mojo-to": "Cities#delete", |
| 232 |
"operationId": "deleteCity", |
273 |
"operationId": "deleteCity", |
| 233 |
"tags": ["cities"], |
274 |
"tags": [ |
| 234 |
"parameters": [{ |
275 |
"cities" |
| 235 |
"$ref": "../parameters.json#/city_id_pp" |
276 |
], |
| 236 |
}], |
277 |
"parameters": [ |
|
|
278 |
{ |
| 279 |
"$ref": "../parameters.json#/city_id_pp" |
| 280 |
} |
| 281 |
], |
| 237 |
"produces": [ |
282 |
"produces": [ |
| 238 |
"application/json" |
283 |
"application/json" |
| 239 |
], |
284 |
], |
| 240 |
- |
|
|