Line 0
Link Here
|
|
|
1 |
{ |
2 |
"/cities": { |
3 |
"get": { |
4 |
"x-mojo-controller": "Koha::REST::V1::Cities", |
5 |
"operationId": "list", |
6 |
"tags": ["cities"], |
7 |
"produces": [ |
8 |
"application/json" |
9 |
], |
10 |
"responses": { |
11 |
"200": { |
12 |
"description": "A list of cities", |
13 |
"schema": { |
14 |
"type": "array", |
15 |
"items": { |
16 |
"$ref": "../definitions.json#/city" |
17 |
} |
18 |
} |
19 |
}, |
20 |
"403": { |
21 |
"description": "Access forbidden", |
22 |
"schema": { |
23 |
"$ref": "../definitions.json#/error" |
24 |
} |
25 |
}, |
26 |
"500": { |
27 |
"description": "Internal error", |
28 |
"schema": { |
29 |
"$ref": "../definitions.json#/error" |
30 |
} |
31 |
} |
32 |
} |
33 |
}, |
34 |
"post": { |
35 |
"x-mojo-controller": "Koha::REST::V1::Cities", |
36 |
"operationId": "add", |
37 |
"tags": ["cities"], |
38 |
"parameters": [{ |
39 |
"name": "body", |
40 |
"in": "body", |
41 |
"description": "A JSON object containing informations about the new hold", |
42 |
"required": true, |
43 |
"schema": { |
44 |
"$ref": "../definitions.json#/city" |
45 |
} |
46 |
} |
47 |
], |
48 |
"produces": [ |
49 |
"application/json" |
50 |
], |
51 |
"responses": { |
52 |
"200": { |
53 |
"description": "City added", |
54 |
"schema": { |
55 |
"$ref": "../definitions.json#/city" |
56 |
} |
57 |
}, |
58 |
"403": { |
59 |
"description": "Access forbidden", |
60 |
"schema": { |
61 |
"$ref": "../definitions.json#/error" |
62 |
} |
63 |
}, |
64 |
"500": { |
65 |
"description": "Internal error", |
66 |
"schema": { |
67 |
"$ref": "../definitions.json#/error" |
68 |
} |
69 |
} |
70 |
}, |
71 |
"x-koha-authorization": { |
72 |
"permissions": { |
73 |
"parameters": "parameters_remaining_permissions" |
74 |
} |
75 |
} |
76 |
} |
77 |
}, |
78 |
"/cities/{cityid}": { |
79 |
"get": { |
80 |
"x-mojo-controller": "Koha::REST::V1::Cities", |
81 |
"operationId": "get", |
82 |
"tags": ["cities"], |
83 |
"parameters": [ |
84 |
{ |
85 |
"$ref": "../parameters.json#/cityidPathParam" |
86 |
} |
87 |
], |
88 |
"produces": [ |
89 |
"application/json" |
90 |
], |
91 |
"responses": { |
92 |
"200": { |
93 |
"description": "A city", |
94 |
"schema": { |
95 |
"$ref": "../definitions.json#/city" |
96 |
} |
97 |
}, |
98 |
"403": { |
99 |
"description": "Access forbidden", |
100 |
"schema": { |
101 |
"$ref": "../definitions.json#/error" |
102 |
} |
103 |
}, |
104 |
"404": { |
105 |
"description": "City not found", |
106 |
"schema": { |
107 |
"$ref": "../definitions.json#/error" |
108 |
} |
109 |
} |
110 |
, |
111 |
"500": { |
112 |
"description": "Internal error", |
113 |
"schema": { |
114 |
"$ref": "../definitions.json#/error" |
115 |
} |
116 |
} |
117 |
} |
118 |
}, |
119 |
"put": { |
120 |
"x-mojo-controller": "Koha::REST::V1::Cities", |
121 |
"operationId": "update", |
122 |
"tags": ["cities"], |
123 |
"parameters": [ |
124 |
{ |
125 |
"$ref": "../parameters.json#/cityidPathParam" |
126 |
}, |
127 |
{ |
128 |
"name": "body", |
129 |
"in": "body", |
130 |
"description": "A JSON object containing informations about the new hold", |
131 |
"required": true, |
132 |
"schema": { |
133 |
"$ref": "../definitions.json#/city" |
134 |
} |
135 |
} |
136 |
], |
137 |
"produces": [ |
138 |
"application/json" |
139 |
], |
140 |
"responses": { |
141 |
"200": { |
142 |
"description": "A city", |
143 |
"schema": { |
144 |
"$ref": "../definitions.json#/city" |
145 |
} |
146 |
}, |
147 |
"403": { |
148 |
"description": "Access forbidden", |
149 |
"schema": { |
150 |
"$ref": "../definitions.json#/error" |
151 |
} |
152 |
}, |
153 |
"404": { |
154 |
"description": "City not found", |
155 |
"schema": { |
156 |
"$ref": "../definitions.json#/error" |
157 |
} |
158 |
}, |
159 |
"500": { |
160 |
"description": "Internal error", |
161 |
"schema": { |
162 |
"$ref": "../definitions.json#/error" |
163 |
} |
164 |
} |
165 |
}, |
166 |
"x-koha-authorization": { |
167 |
"permissions": { |
168 |
"parameters": "parameters_remaining_permissions" |
169 |
} |
170 |
} |
171 |
}, |
172 |
"delete": { |
173 |
"x-mojo-controller": "Koha::REST::V1::Cities", |
174 |
"operationId": "delete", |
175 |
"tags": ["cities"], |
176 |
"parameters": [ |
177 |
{ |
178 |
"$ref": "../parameters.json#/cityidPathParam" |
179 |
} |
180 |
], |
181 |
"produces": [ |
182 |
"application/json" |
183 |
], |
184 |
"responses": { |
185 |
"200": { |
186 |
"description": "City deleted", |
187 |
"schema": { |
188 |
"type": "string" |
189 |
} |
190 |
}, |
191 |
"403": { |
192 |
"description": "Access forbidden", |
193 |
"schema": { |
194 |
"$ref": "../definitions.json#/error" |
195 |
} |
196 |
}, |
197 |
"404": { |
198 |
"description": "City not found", |
199 |
"schema": { |
200 |
"$ref": "../definitions.json#/error" |
201 |
} |
202 |
}, |
203 |
"500": { |
204 |
"description": "Internal error", |
205 |
"schema": { |
206 |
"$ref": "../definitions.json#/error" |
207 |
} |
208 |
} |
209 |
}, |
210 |
"x-koha-authorization": { |
211 |
"permissions": { |
212 |
"parameters": "parameters_remaining_permissions" |
213 |
} |
214 |
} |
215 |
} |
216 |
} |
217 |
} |