|
Line 0
Link Here
|
| 0 |
- |
1 |
{ |
|
|
2 |
"/suggestions": { |
| 3 |
"get": { |
| 4 |
"x-mojo-to": "Suggestions#list", |
| 5 |
"operationId" : "list", |
| 6 |
"tags": ["patrons", "suggestions"], |
| 7 |
"parameters": [ |
| 8 |
{ |
| 9 |
"$ref": "../parameters.json#/match" |
| 10 |
}, |
| 11 |
{ |
| 12 |
"$ref": "../parameters.json#/order_by" |
| 13 |
}, |
| 14 |
{ |
| 15 |
"$ref": "../parameters.json#/page" |
| 16 |
}, |
| 17 |
{ |
| 18 |
"$ref": "../parameters.json#/per_page" |
| 19 |
}, |
| 20 |
{ |
| 21 |
"$ref": "../parameters.json#/q_param" |
| 22 |
}, |
| 23 |
{ |
| 24 |
"$ref": "../parameters.json#/q_body" |
| 25 |
}, |
| 26 |
{ |
| 27 |
"$ref": "../parameters.json#/q_header" |
| 28 |
} |
| 29 |
], |
| 30 |
"produces": [ |
| 31 |
"application/json" |
| 32 |
], |
| 33 |
"responses": { |
| 34 |
"200": { |
| 35 |
"description": "A list of suggestions", |
| 36 |
"schema": { |
| 37 |
"type": "array", |
| 38 |
"items": { |
| 39 |
"$ref": "../definitions.json#/suggestion" |
| 40 |
} |
| 41 |
} |
| 42 |
}, |
| 43 |
"403": { |
| 44 |
"description": "Access forbidden", |
| 45 |
"schema": { |
| 46 |
"$ref": "../definitions.json#/error" |
| 47 |
} |
| 48 |
}, |
| 49 |
"500": { |
| 50 |
"description": "Internal error", |
| 51 |
"schema": { |
| 52 |
"$ref": "../definitions.json#/error" |
| 53 |
} |
| 54 |
}, |
| 55 |
"503": { |
| 56 |
"description": "Under maintenance", |
| 57 |
"schema": { |
| 58 |
"$ref": "../definitions.json#/error" |
| 59 |
} |
| 60 |
} |
| 61 |
}, |
| 62 |
"x-koha-authorization": { |
| 63 |
"permissions": { |
| 64 |
"suggestions": "suggestions_manage" |
| 65 |
} |
| 66 |
} |
| 67 |
}, |
| 68 |
"post": { |
| 69 |
"x-mojo-to": "Suggestions#add", |
| 70 |
"operationId": "add", |
| 71 |
"tags": ["patrons", "suggestions"], |
| 72 |
"parameters": [{ |
| 73 |
"name": "body", |
| 74 |
"in": "body", |
| 75 |
"description": "A JSON object containing informations about the new suggestion", |
| 76 |
"required": true, |
| 77 |
"schema": { |
| 78 |
"$ref": "../definitions.json#/suggestion" |
| 79 |
} |
| 80 |
}], |
| 81 |
"produces": [ |
| 82 |
"application/json" |
| 83 |
], |
| 84 |
"responses": { |
| 85 |
"201": { |
| 86 |
"description": "Suggestion added", |
| 87 |
"schema": { |
| 88 |
"$ref": "../definitions.json#/suggestion" |
| 89 |
} |
| 90 |
}, |
| 91 |
"400": { |
| 92 |
"description": "Bad request", |
| 93 |
"schema": { |
| 94 |
"$ref": "../definitions.json#/error" |
| 95 |
} |
| 96 |
}, |
| 97 |
"403": { |
| 98 |
"description": "Access forbidden", |
| 99 |
"schema": { |
| 100 |
"$ref": "../definitions.json#/error" |
| 101 |
} |
| 102 |
}, |
| 103 |
"500": { |
| 104 |
"description": "Internal error", |
| 105 |
"schema": { |
| 106 |
"$ref": "../definitions.json#/error" |
| 107 |
} |
| 108 |
}, |
| 109 |
"503": { |
| 110 |
"description": "Under maintenance", |
| 111 |
"schema": { |
| 112 |
"$ref": "../definitions.json#/error" |
| 113 |
} |
| 114 |
} |
| 115 |
}, |
| 116 |
"x-koha-authorization": { |
| 117 |
"permissions": { |
| 118 |
"suggestions": "suggestions_manage" |
| 119 |
} |
| 120 |
} |
| 121 |
} |
| 122 |
}, |
| 123 |
"/suggestions/{suggestion_id}": { |
| 124 |
"get": { |
| 125 |
"x-mojo-to": "Suggestions#get", |
| 126 |
"operationId": "getSuggestions", |
| 127 |
"tags": ["patrons", "suggestions"], |
| 128 |
"parameters": [{ |
| 129 |
"$ref": "../parameters.json#/suggestion_id_pp" |
| 130 |
} |
| 131 |
], |
| 132 |
"produces": [ |
| 133 |
"application/json" |
| 134 |
], |
| 135 |
"responses": { |
| 136 |
"200": { |
| 137 |
"description": "A suggestion", |
| 138 |
"schema": { |
| 139 |
"$ref": "../definitions.json#/suggestion" |
| 140 |
} |
| 141 |
}, |
| 142 |
"403": { |
| 143 |
"description": "Access forbidden", |
| 144 |
"schema": { |
| 145 |
"$ref": "../definitions.json#/error" |
| 146 |
} |
| 147 |
}, |
| 148 |
"404": { |
| 149 |
"description": "Suggestion not found", |
| 150 |
"schema": { |
| 151 |
"$ref": "../definitions.json#/error" |
| 152 |
} |
| 153 |
}, |
| 154 |
"500": { |
| 155 |
"description": "Internal error", |
| 156 |
"schema": { |
| 157 |
"$ref": "../definitions.json#/error" |
| 158 |
} |
| 159 |
}, |
| 160 |
"503": { |
| 161 |
"description": "Under maintenance", |
| 162 |
"schema": { |
| 163 |
"$ref": "../definitions.json#/error" |
| 164 |
} |
| 165 |
} |
| 166 |
}, |
| 167 |
"x-koha-authorization": { |
| 168 |
"permissions": { |
| 169 |
"suggestions": "suggestions_manage" |
| 170 |
} |
| 171 |
} |
| 172 |
}, |
| 173 |
"put": { |
| 174 |
"x-mojo-to": "Suggestions#update", |
| 175 |
"operationId": "update", |
| 176 |
"tags": ["patrons", "suggestions"], |
| 177 |
"parameters": [{ |
| 178 |
"$ref": "../parameters.json#/suggestion_id_pp" |
| 179 |
}, { |
| 180 |
"name": "body", |
| 181 |
"in": "body", |
| 182 |
"description": "A JSON object containing informations about the new hold", |
| 183 |
"required": true, |
| 184 |
"schema": { |
| 185 |
"$ref": "../definitions.json#/suggestion" |
| 186 |
} |
| 187 |
}], |
| 188 |
"produces": [ |
| 189 |
"application/json" |
| 190 |
], |
| 191 |
"responses": { |
| 192 |
"200": { |
| 193 |
"description": "A suggestion", |
| 194 |
"schema": { |
| 195 |
"$ref": "../definitions.json#/suggestion" |
| 196 |
} |
| 197 |
}, |
| 198 |
"400": { |
| 199 |
"description": "Bad request", |
| 200 |
"schema": { |
| 201 |
"$ref": "../definitions.json#/error" |
| 202 |
} |
| 203 |
}, |
| 204 |
"403": { |
| 205 |
"description": "Access forbidden", |
| 206 |
"schema": { |
| 207 |
"$ref": "../definitions.json#/error" |
| 208 |
} |
| 209 |
}, |
| 210 |
"404": { |
| 211 |
"description": "Suggestion not found", |
| 212 |
"schema": { |
| 213 |
"$ref": "../definitions.json#/error" |
| 214 |
} |
| 215 |
}, |
| 216 |
"500": { |
| 217 |
"description": "Internal error", |
| 218 |
"schema": { |
| 219 |
"$ref": "../definitions.json#/error" |
| 220 |
} |
| 221 |
}, |
| 222 |
"503": { |
| 223 |
"description": "Under maintenance", |
| 224 |
"schema": { |
| 225 |
"$ref": "../definitions.json#/error" |
| 226 |
} |
| 227 |
} |
| 228 |
}, |
| 229 |
"x-koha-authorization": { |
| 230 |
"permissions": { |
| 231 |
"suggestions": "suggestions_manage" |
| 232 |
} |
| 233 |
} |
| 234 |
}, |
| 235 |
"delete": { |
| 236 |
"x-mojo-to": "Suggestions#delete", |
| 237 |
"operationId": "delete", |
| 238 |
"tags": ["patrons", "suggestions"], |
| 239 |
"parameters": [{ |
| 240 |
"$ref": "../parameters.json#/suggestion_id_pp" |
| 241 |
}], |
| 242 |
"produces": [ |
| 243 |
"application/json" |
| 244 |
], |
| 245 |
"responses": { |
| 246 |
"204": { |
| 247 |
"description": "Suggestion deleted", |
| 248 |
"schema": { |
| 249 |
"type": "string" |
| 250 |
} |
| 251 |
}, |
| 252 |
"401": { |
| 253 |
"description": "Authentication required", |
| 254 |
"schema": { |
| 255 |
"$ref": "../definitions.json#/error" |
| 256 |
} |
| 257 |
}, |
| 258 |
"403": { |
| 259 |
"description": "Access forbidden", |
| 260 |
"schema": { |
| 261 |
"$ref": "../definitions.json#/error" |
| 262 |
} |
| 263 |
}, |
| 264 |
"404": { |
| 265 |
"description": "Suggestion not found", |
| 266 |
"schema": { |
| 267 |
"$ref": "../definitions.json#/error" |
| 268 |
} |
| 269 |
}, |
| 270 |
"500": { |
| 271 |
"description": "Internal error", |
| 272 |
"schema": { |
| 273 |
"$ref": "../definitions.json#/error" |
| 274 |
} |
| 275 |
}, |
| 276 |
"503": { |
| 277 |
"description": "Under maintenance", |
| 278 |
"schema": { |
| 279 |
"$ref": "../definitions.json#/error" |
| 280 |
} |
| 281 |
} |
| 282 |
}, |
| 283 |
"x-koha-authorization": { |
| 284 |
"permissions": { |
| 285 |
"suggestions": "suggestions_manage" |
| 286 |
} |
| 287 |
} |
| 288 |
} |
| 289 |
} |
| 290 |
} |