View | Details | Raw Unified | Return to bug 37018
Collapse All | Expand All

(-)a/Koha/REST/Plugin/Exceptions.pm (-1 / +1 lines)
Lines 61-67 sub register { Link Here
61
61
62
            if ( blessed $exception && ref($exception) eq 'Koha::Exceptions::REST::Query::InvalidOperator' ) {
62
            if ( blessed $exception && ref($exception) eq 'Koha::Exceptions::REST::Query::InvalidOperator' ) {
63
                return $c->render(
63
                return $c->render(
64
                    status => 500,
64
                    status => 400,
65
                    json   => {
65
                    json   => {
66
                        error      => printf( "Invalid operator in query: %s", $exception->operator ),
66
                        error      => printf( "Invalid operator in query: %s", $exception->operator ),
67
                        error_code => 'invalid_query',
67
                        error_code => 'invalid_query',
(-)a/api/v1/swagger/paths/acquisitions_baskets.yaml (+7 lines)
Lines 34-39 Link Here
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/patron"
36
            $ref: "../swagger.yaml#/definitions/patron"
37
      "400":
38
        description: |
39
          Bad request. Possible `error_code` attribute values:
40
41
            * `invalid_query`
42
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
37
      "403":
44
      "403":
38
        description: Access forbidden
45
        description: Access forbidden
39
        schema:
46
        schema:
(-)a/api/v1/swagger/paths/acquisitions_funds.yaml (+21 lines)
Lines 34-39 Link Here
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/fund"
36
            $ref: "../swagger.yaml#/definitions/fund"
37
      "400":
38
        description: |
39
          Bad request. Possible `error_code` attribute values:
40
41
            * `invalid_query`
42
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
37
      "401":
44
      "401":
38
        description: Authentication required
45
        description: Authentication required
39
        schema:
46
        schema:
Lines 95-100 Link Here
95
          type: array
102
          type: array
96
          items:
103
          items:
97
            $ref: "../swagger.yaml#/definitions/patron"
104
            $ref: "../swagger.yaml#/definitions/patron"
105
      "400":
106
        description: |
107
          Bad request. Possible `error_code` attribute values:
108
109
            * `invalid_query`
110
        schema:
111
          $ref: "../swagger.yaml#/definitions/error"
98
      "403":
112
      "403":
99
        description: Access forbidden
113
        description: Access forbidden
100
        schema:
114
        schema:
Lines 148-153 Link Here
148
          type: array
162
          type: array
149
          items:
163
          items:
150
            $ref: "../swagger.yaml#/definitions/patron"
164
            $ref: "../swagger.yaml#/definitions/patron"
165
      "400":
166
        description: |
167
          Bad request. Possible `error_code` attribute values:
168
169
            * `invalid_query`
170
        schema:
171
          $ref: "../swagger.yaml#/definitions/error"
151
      "403":
172
      "403":
152
        description: Access forbidden
173
        description: Access forbidden
153
        schema:
174
        schema:
(-)a/api/v1/swagger/paths/acquisitions_orders.yaml (+19 lines)
Lines 73-78 Link Here
73
          type: array
73
          type: array
74
          items:
74
          items:
75
            $ref: "../swagger.yaml#/definitions/order"
75
            $ref: "../swagger.yaml#/definitions/order"
76
      "400":
77
        description: |
78
          Bad request. Possible `error_code` attribute values:
79
80
            * `invalid_query`
81
        schema:
82
          $ref: "../swagger.yaml#/definitions/error"
76
      "401":
83
      "401":
77
        description: Authentication required
84
        description: Authentication required
78
        schema:
85
        schema:
Lines 190-195 Link Here
190
        description: An order
197
        description: An order
191
        schema:
198
        schema:
192
          $ref: "../swagger.yaml#/definitions/order"
199
          $ref: "../swagger.yaml#/definitions/order"
200
      "400":
201
        description: Bad request
202
        schema:
203
          $ref: "../swagger.yaml#/definitions/error"
193
      "401":
204
      "401":
194
        description: Authentication required
205
        description: Authentication required
195
        schema:
206
        schema:
Lines 237-242 Link Here
237
        description: An order
248
        description: An order
238
        schema:
249
        schema:
239
          $ref: "../swagger.yaml#/definitions/order"
250
          $ref: "../swagger.yaml#/definitions/order"
251
      "400":
252
        description: Bad request
253
        schema:
254
          $ref: "../swagger.yaml#/definitions/error"
240
      "401":
255
      "401":
241
        description: Authentication required
256
        description: Authentication required
242
        schema:
257
        schema:
Lines 276-281 Link Here
276
    responses:
291
    responses:
277
      "204":
292
      "204":
278
        description: Order deleted
293
        description: Order deleted
294
      "400":
295
        description: Bad request
296
        schema:
297
          $ref: "../swagger.yaml#/definitions/error"
279
      "401":
298
      "401":
280
        description: Authentication required
299
        description: Authentication required
281
        schema:
300
        schema:
(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (+23 lines)
Lines 34-39 Link Here
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/vendor"
36
            $ref: "../swagger.yaml#/definitions/vendor"
37
      "400":
38
        description: |
39
          Bad request. Possible `error_code` attribute values:
40
41
            * `invalid_query`
42
        schema:
43
          $ref: "../swagger.yaml#/definitions/error"
37
      "401":
44
      "401":
38
        description: Authentication required
45
        description: Authentication required
39
        schema:
46
        schema:
Lines 80-85 Link Here
80
        description: Vendor added
87
        description: Vendor added
81
        schema:
88
        schema:
82
          $ref: "../swagger.yaml#/definitions/vendor"
89
          $ref: "../swagger.yaml#/definitions/vendor"
90
      "400":
91
        description: Bad request
92
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
83
      "401":
94
      "401":
84
        description: Authentication required
95
        description: Authentication required
85
        schema:
96
        schema:
Lines 122-127 Link Here
122
        description: A vendor
133
        description: A vendor
123
        schema:
134
        schema:
124
          $ref: "../swagger.yaml#/definitions/vendor"
135
          $ref: "../swagger.yaml#/definitions/vendor"
136
      "400":
137
        description: Bad request
138
        schema:
139
          $ref: "../swagger.yaml#/definitions/error"
125
      "401":
140
      "401":
126
        description: Authentication required
141
        description: Authentication required
127
        schema:
142
        schema:
Lines 169-174 Link Here
169
        description: A vendor
184
        description: A vendor
170
        schema:
185
        schema:
171
          $ref: "../swagger.yaml#/definitions/vendor"
186
          $ref: "../swagger.yaml#/definitions/vendor"
187
      "400":
188
        description: Bad request
189
        schema:
190
          $ref: "../swagger.yaml#/definitions/error"
172
      "401":
191
      "401":
173
        description: Authentication required
192
        description: Authentication required
174
        schema:
193
        schema:
Lines 208-213 Link Here
208
    responses:
227
    responses:
209
      "204":
228
      "204":
210
        description: Vendor deleted
229
        description: Vendor deleted
230
      "400":
231
        description: Bad request
232
        schema:
233
          $ref: "../swagger.yaml#/definitions/error"
211
      "401":
234
      "401":
212
        description: Authentication required
235
        description: Authentication required
213
        schema:
236
        schema:
(-)a/api/v1/swagger/paths/advancededitormacros.yaml (+39 lines)
Lines 44-49 Link Here
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/advancededitormacro"
46
            $ref: "../swagger.yaml#/definitions/advancededitormacro"
47
      "400":
48
        description: |
49
          Bad request. Possible `error_code` attribute values:
50
51
            * `invalid_query`
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
47
      "403":
54
      "403":
48
        description: Access forbidden
55
        description: Access forbidden
49
        schema:
56
        schema:
Lines 82-87 Link Here
82
        description: Macro added
89
        description: Macro added
83
        schema:
90
        schema:
84
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
91
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
92
      "400":
93
        description: Bad request
94
        schema:
95
          $ref: "../swagger.yaml#/definitions/error"
85
      "401":
96
      "401":
86
        description: Authentication required
97
        description: Authentication required
87
        schema:
98
        schema:
Lines 122-127 Link Here
122
        description: Macro added
133
        description: Macro added
123
        schema:
134
        schema:
124
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
135
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
136
      "400":
137
        description: Bad request
138
        schema:
139
          $ref: "../swagger.yaml#/definitions/error"
125
      "401":
140
      "401":
126
        description: Authentication required
141
        description: Authentication required
127
        schema:
142
        schema:
Lines 159-164 Link Here
159
        description: A macro
174
        description: A macro
160
        schema:
175
        schema:
161
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
176
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
177
      "400":
178
        description: Bad request
179
        schema:
180
          $ref: "../swagger.yaml#/definitions/error"
162
      "403":
181
      "403":
163
        description: Access forbidden
182
        description: Access forbidden
164
        schema:
183
        schema:
Lines 199-204 Link Here
199
        description: An advanced editor macro
218
        description: An advanced editor macro
200
        schema:
219
        schema:
201
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
220
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
221
      "400":
222
        description: Bad request
223
        schema:
224
          $ref: "../swagger.yaml#/definitions/error"
202
      "401":
225
      "401":
203
        description: Authentication required
226
        description: Authentication required
204
        schema:
227
        schema:
Lines 237-242 Link Here
237
        description: Advanced editor macro deleted
260
        description: Advanced editor macro deleted
238
        schema:
261
        schema:
239
          type: string
262
          type: string
263
      "400":
264
        description: Bad request
265
        schema:
266
          $ref: "../swagger.yaml#/definitions/error"
240
      "401":
267
      "401":
241
        description: Authentication required
268
        description: Authentication required
242
        schema:
269
        schema:
Lines 276-281 Link Here
276
        description: A macro
303
        description: A macro
277
        schema:
304
        schema:
278
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
305
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
306
      "400":
307
        description: Bad request
308
        schema:
309
          $ref: "../swagger.yaml#/definitions/error"
279
      "403":
310
      "403":
280
        description: Access forbidden
311
        description: Access forbidden
281
        schema:
312
        schema:
Lines 316-321 Link Here
316
        description: An advanced editor macro
347
        description: An advanced editor macro
317
        schema:
348
        schema:
318
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
349
          $ref: "../swagger.yaml#/definitions/advancededitormacro"
350
      "400":
351
        description: Bad request
352
        schema:
353
          $ref: "../swagger.yaml#/definitions/error"
319
      "401":
354
      "401":
320
        description: Authentication required
355
        description: Authentication required
321
        schema:
356
        schema:
Lines 356-361 Link Here
356
        description: Advanced editor macro deleted
391
        description: Advanced editor macro deleted
357
        schema:
392
        schema:
358
          type: string
393
          type: string
394
      "400":
395
        description: Bad request
396
        schema:
397
          $ref: "../swagger.yaml#/definitions/error"
359
      "401":
398
      "401":
360
        description: Authentication required
399
        description: Authentication required
361
        schema:
400
        schema:
(-)a/api/v1/swagger/paths/auth.yaml (-15 / +67 lines)
Lines 22-28 Link Here
22
              type: integer
22
              type: integer
23
          additionalProperties: false
23
          additionalProperties: false
24
      "400":
24
      "400":
25
        description: Bad Request
25
        description: Bad request
26
        schema:
26
        schema:
27
          $ref: "../swagger.yaml#/definitions/error"
27
          $ref: "../swagger.yaml#/definitions/error"
28
      "403":
28
      "403":
Lines 65-71 Link Here
65
              type: string
65
              type: string
66
          additionalProperties: false
66
          additionalProperties: false
67
      "400":
67
      "400":
68
        description: Bad Request
68
        description: Bad request
69
        schema:
69
        schema:
70
          $ref: "../swagger.yaml#/definitions/error"
70
          $ref: "../swagger.yaml#/definitions/error"
71
      "403":
71
      "403":
Lines 111-117 Link Here
111
        schema:
111
        schema:
112
          $ref: "../swagger.yaml#/definitions/error"
112
          $ref: "../swagger.yaml#/definitions/error"
113
      "400":
113
      "400":
114
        description: Bad Request
114
        description: Bad request
115
        schema:
115
        schema:
116
          $ref: "../swagger.yaml#/definitions/error"
116
          $ref: "../swagger.yaml#/definitions/error"
117
      "403":
117
      "403":
Lines 164-172 Link Here
164
          items:
164
          items:
165
            $ref: ../swagger.yaml#/definitions/auth_provider
165
            $ref: ../swagger.yaml#/definitions/auth_provider
166
      "400":
166
      "400":
167
        description: Bad Request
167
        description: |
168
          Bad request. Possible `error_code` attribute values:
169
170
            * `invalid_query`
168
        schema:
171
        schema:
169
          $ref: ../swagger.yaml#/definitions/error
172
          $ref: "../swagger.yaml#/definitions/error"
170
      "403":
173
      "403":
171
        description: Access forbidden
174
        description: Access forbidden
172
        schema:
175
        schema:
Lines 226-232 Link Here
226
        schema:
229
        schema:
227
          $ref: ../swagger.yaml#/definitions/auth_provider
230
          $ref: ../swagger.yaml#/definitions/auth_provider
228
      "400":
231
      "400":
229
        description: Bad Request
232
        description: Bad request
230
        schema:
233
        schema:
231
          $ref: ../swagger.yaml#/definitions/error
234
          $ref: ../swagger.yaml#/definitions/error
232
      "403":
235
      "403":
Lines 273-278 Link Here
273
        description: An identity provider
276
        description: An identity provider
274
        schema:
277
        schema:
275
          $ref: ../swagger.yaml#/definitions/auth_provider
278
          $ref: ../swagger.yaml#/definitions/auth_provider
279
      "400":
280
        description: Bad request
281
        schema:
282
          $ref: "../swagger.yaml#/definitions/error"
276
      "404":
283
      "404":
277
        description: Object not found
284
        description: Object not found
278
        schema:
285
        schema:
Lines 333-339 Link Here
333
        schema:
340
        schema:
334
          $ref: ../swagger.yaml#/definitions/auth_provider
341
          $ref: ../swagger.yaml#/definitions/auth_provider
335
      "400":
342
      "400":
336
        description: Bad Request
343
        description: Bad request
337
        schema:
344
        schema:
338
          $ref: ../swagger.yaml#/definitions/error
345
          $ref: ../swagger.yaml#/definitions/error
339
      "403":
346
      "403":
Lines 371-376 Link Here
371
    responses:
378
    responses:
372
      "204":
379
      "204":
373
        description: identity provider deleted
380
        description: identity provider deleted
381
      "400":
382
        description: Bad request
383
        schema:
384
          $ref: "../swagger.yaml#/definitions/error"
374
      "401":
385
      "401":
375
        description: Authentication required
386
        description: Authentication required
376
        schema:
387
        schema:
Lines 430-435 Link Here
430
        schema:
441
        schema:
431
          items:
442
          items:
432
            $ref: ../swagger.yaml#/definitions/auth_provider_domain
443
            $ref: ../swagger.yaml#/definitions/auth_provider_domain
444
      "400":
445
        description: |
446
          Bad request. Possible `error_code` attribute values:
447
448
            * `invalid_query`
449
        schema:
450
          $ref: "../swagger.yaml#/definitions/error"
433
      "404":
451
      "404":
434
        description: Object not found
452
        description: Object not found
435
        schema:
453
        schema:
Lines 470-476 Link Here
470
        schema:
488
        schema:
471
          $ref: ../swagger.yaml#/definitions/auth_provider_domain
489
          $ref: ../swagger.yaml#/definitions/auth_provider_domain
472
      "400":
490
      "400":
473
        description: Bad Request
491
        description: Bad request
474
        schema:
492
        schema:
475
          $ref: ../swagger.yaml#/definitions/error
493
          $ref: ../swagger.yaml#/definitions/error
476
      "403":
494
      "403":
Lines 512-517 Link Here
512
        description: An identity provider
530
        description: An identity provider
513
        schema:
531
        schema:
514
          $ref: ../swagger.yaml#/definitions/auth_provider_domain
532
          $ref: ../swagger.yaml#/definitions/auth_provider_domain
533
      "400":
534
        description: Bad request
535
        schema:
536
          $ref: "../swagger.yaml#/definitions/error"
515
      "404":
537
      "404":
516
        description: Object not found
538
        description: Object not found
517
        schema:
539
        schema:
Lines 544-549 Link Here
544
    responses:
566
    responses:
545
      "204":
567
      "204":
546
        description: identity provider deleted
568
        description: identity provider deleted
569
      "400":
570
        description: Bad request
571
        schema:
572
          $ref: "../swagger.yaml#/definitions/error"
547
      "401":
573
      "401":
548
        description: Authentication required
574
        description: Authentication required
549
        schema:
575
        schema:
Lines 604-612 Link Here
604
          items:
630
          items:
605
            $ref: ../swagger.yaml#/definitions/identity_provider
631
            $ref: ../swagger.yaml#/definitions/identity_provider
606
      "400":
632
      "400":
607
        description: Bad Request
633
        description: |
634
          Bad request. Possible `error_code` attribute values:
635
636
            * `invalid_query`
608
        schema:
637
        schema:
609
          $ref: ../swagger.yaml#/definitions/error
638
          $ref: "../swagger.yaml#/definitions/error"
610
      "403":
639
      "403":
611
        description: Access forbidden
640
        description: Access forbidden
612
        schema:
641
        schema:
Lines 666-672 Link Here
666
        schema:
695
        schema:
667
          $ref: ../swagger.yaml#/definitions/identity_provider
696
          $ref: ../swagger.yaml#/definitions/identity_provider
668
      "400":
697
      "400":
669
        description: Bad Request
698
        description: Bad request
670
        schema:
699
        schema:
671
          $ref: ../swagger.yaml#/definitions/error
700
          $ref: ../swagger.yaml#/definitions/error
672
      "403":
701
      "403":
Lines 713-718 Link Here
713
        description: An identity provider
742
        description: An identity provider
714
        schema:
743
        schema:
715
          $ref: ../swagger.yaml#/definitions/identity_provider
744
          $ref: ../swagger.yaml#/definitions/identity_provider
745
      "400":
746
        description: Bad request
747
        schema:
748
          $ref: "../swagger.yaml#/definitions/error"
716
      "404":
749
      "404":
717
        description: Object not found
750
        description: Object not found
718
        schema:
751
        schema:
Lines 773-779 Link Here
773
        schema:
806
        schema:
774
          $ref: ../swagger.yaml#/definitions/identity_provider
807
          $ref: ../swagger.yaml#/definitions/identity_provider
775
      "400":
808
      "400":
776
        description: Bad Request
809
        description: Bad request
777
        schema:
810
        schema:
778
          $ref: ../swagger.yaml#/definitions/error
811
          $ref: ../swagger.yaml#/definitions/error
779
      "403":
812
      "403":
Lines 810-816 Link Here
810
      - application/json
843
      - application/json
811
    responses:
844
    responses:
812
      "204":
845
      "204":
813
        description: identity provider deleted
846
        description: Identity provider deleted
847
      "400":
848
        description: Bad request
849
        schema:
850
          $ref: "../swagger.yaml#/definitions/error"
814
      "401":
851
      "401":
815
        description: Authentication required
852
        description: Authentication required
816
        schema:
853
        schema:
Lines 870-875 Link Here
870
        schema:
907
        schema:
871
          items:
908
          items:
872
            $ref: ../swagger.yaml#/definitions/identity_provider_domain
909
            $ref: ../swagger.yaml#/definitions/identity_provider_domain
910
      "400":
911
        description: |
912
          Bad request. Possible `error_code` attribute values:
913
914
            * `invalid_query`
915
        schema:
916
          $ref: "../swagger.yaml#/definitions/error"
873
      "404":
917
      "404":
874
        description: Object not found
918
        description: Object not found
875
        schema:
919
        schema:
Lines 910-916 Link Here
910
        schema:
954
        schema:
911
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
955
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
912
      "400":
956
      "400":
913
        description: Bad Request
957
        description: Bad request
914
        schema:
958
        schema:
915
          $ref: ../swagger.yaml#/definitions/error
959
          $ref: ../swagger.yaml#/definitions/error
916
      "403":
960
      "403":
Lines 952-957 Link Here
952
        description: An identity provider
996
        description: An identity provider
953
        schema:
997
        schema:
954
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
998
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
999
      "400":
1000
        description: Bad request
1001
        schema:
1002
          $ref: "../swagger.yaml#/definitions/error"
955
      "404":
1003
      "404":
956
        description: Object not found
1004
        description: Object not found
957
        schema:
1005
        schema:
Lines 993-999 Link Here
993
        schema:
1041
        schema:
994
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
1042
          $ref: ../swagger.yaml#/definitions/identity_provider_domain
995
      "400":
1043
      "400":
996
        description: Bad Request
1044
        description: Bad request
997
        schema:
1045
        schema:
998
          $ref: ../swagger.yaml#/definitions/error
1046
          $ref: ../swagger.yaml#/definitions/error
999
      "403":
1047
      "403":
Lines 1032-1037 Link Here
1032
    responses:
1080
    responses:
1033
      "204":
1081
      "204":
1034
        description: identity provider deleted
1082
        description: identity provider deleted
1083
      "400":
1084
        description: Bad request
1085
        schema:
1086
          $ref: "../swagger.yaml#/definitions/error"
1035
      "401":
1087
      "401":
1036
        description: Authentication required
1088
        description: Authentication required
1037
        schema:
1089
        schema:
(-)a/api/v1/swagger/paths/authorised_value_categories.yaml (-1 / +4 lines)
Lines 34-40 Link Here
34
            $ref: "../swagger.yaml#/definitions/authorised_value_category"
34
            $ref: "../swagger.yaml#/definitions/authorised_value_category"
35
          type: array
35
          type: array
36
      400:
36
      400:
37
        description: Bad request
37
        description: |
38
          Bad request. Possible `error_code` attribute values:
39
40
            * `invalid_query`
38
        schema:
41
        schema:
39
          $ref: "../swagger.yaml#/definitions/error"
42
          $ref: "../swagger.yaml#/definitions/error"
40
      403:
43
      403:
(-)a/api/v1/swagger/paths/authorised_values.yaml (-1 / +4 lines)
Lines 59-65 Link Here
59
            $ref: "../swagger.yaml#/definitions/authorised_value"
59
            $ref: "../swagger.yaml#/definitions/authorised_value"
60
          type: array
60
          type: array
61
      400:
61
      400:
62
        description: Bad request
62
        description: |
63
          Bad request. Possible `error_code` attribute values:
64
65
            * `invalid_query`
63
        schema:
66
        schema:
64
          $ref: "../swagger.yaml#/definitions/error"
67
          $ref: "../swagger.yaml#/definitions/error"
65
      403:
68
      403:
(-)a/api/v1/swagger/paths/biblios.yaml (-1 / +48 lines)
Lines 84-89 Link Here
84
    responses:
84
    responses:
85
      "200":
85
      "200":
86
        description: A list of biblios
86
        description: A list of biblios
87
      "400":
88
        description: |
89
          Bad request. Possible `error_code` attribute values:
90
91
            * `invalid_query`
92
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
87
      "401":
94
      "401":
88
        description: Authentication required
95
        description: Authentication required
89
        schema:
96
        schema:
Lines 135-140 Link Here
135
    responses:
142
    responses:
136
      "200":
143
      "200":
137
        description: A biblio
144
        description: A biblio
145
      "400":
146
        description: Bad request
147
        schema:
148
          $ref: "../swagger.yaml#/definitions/error"
138
      "401":
149
      "401":
139
        description: Authentication required
150
        description: Authentication required
140
        schema:
151
        schema:
Lines 183-188 Link Here
183
        description: Biblio deleted
194
        description: Biblio deleted
184
        schema:
195
        schema:
185
          type: string
196
          type: string
197
      "400":
198
        description: Bad request
199
        schema:
200
          $ref: "../swagger.yaml#/definitions/error"
186
      "401":
201
      "401":
187
        description: Authentication required
202
        description: Authentication required
188
        schema:
203
        schema:
Lines 317-322 Link Here
317
        description: A list of checkouts
332
        description: A list of checkouts
318
        schema:
333
        schema:
319
          $ref: "../swagger.yaml#/definitions/checkouts"
334
          $ref: "../swagger.yaml#/definitions/checkouts"
335
      "400":
336
        description: |
337
          Bad request. Possible `error_code` attribute values:
338
339
            * `invalid_query`
340
        schema:
341
          $ref: "../swagger.yaml#/definitions/error"
320
      "403":
342
      "403":
321
        description: Access forbidden
343
        description: Access forbidden
322
        schema:
344
        schema:
Lines 377-382 Link Here
377
          type: array
399
          type: array
378
          items:
400
          items:
379
            $ref: "../swagger.yaml#/definitions/item"
401
            $ref: "../swagger.yaml#/definitions/item"
402
      "400":
403
        description: |
404
          Bad request. Possible `error_code` attribute values:
405
406
            * `invalid_query`
407
        schema:
408
          $ref: "../swagger.yaml#/definitions/error"
380
      "401":
409
      "401":
381
        description: Authentication required
410
        description: Authentication required
382
        schema:
411
        schema:
Lines 443-449 Link Here
443
          items:
472
          items:
444
            $ref: "../swagger.yaml#/definitions/library"
473
            $ref: "../swagger.yaml#/definitions/library"
445
      "400":
474
      "400":
446
        description: Missing or wrong parameters
475
        description: |
476
          Bad request. Possible `error_code` attribute values:
477
478
            * `invalid_query`
447
        schema:
479
        schema:
448
          $ref: "../swagger.yaml#/definitions/error"
480
          $ref: "../swagger.yaml#/definitions/error"
449
      "401":
481
      "401":
Lines 489-494 Link Here
489
    responses:
521
    responses:
490
      "200":
522
      "200":
491
        description: A biblio
523
        description: A biblio
524
      "400":
525
        description: Bad request
526
        schema:
527
          $ref: "../swagger.yaml#/definitions/error"
492
      "401":
528
      "401":
493
        description: Authentication required
529
        description: Authentication required
494
        schema:
530
        schema:
Lines 546-551 Link Here
546
          type: array
582
          type: array
547
          items:
583
          items:
548
            $ref: "../swagger.yaml#/definitions/item"
584
            $ref: "../swagger.yaml#/definitions/item"
585
      "400":
586
        description: |
587
          Bad request. Possible `error_code` attribute values:
588
589
            * `invalid_query`
590
        schema:
591
          $ref: "../swagger.yaml#/definitions/error"
549
      "401":
592
      "401":
550
        description: Authentication required
593
        description: Authentication required
551
        schema:
594
        schema:
Lines 619-624 Link Here
619
              description: number of ratings
662
              description: number of ratings
620
              type: integer
663
              type: integer
621
          additionalProperties: false
664
          additionalProperties: false
665
      "400":
666
        description: Bad request
667
        schema:
668
          $ref: "../swagger.yaml#/definitions/error"
622
      "401":
669
      "401":
623
        description: Authentication required
670
        description: Authentication required
624
        schema:
671
        schema:
(-)a/api/v1/swagger/paths/biblios_item_groups.yaml (-2 / +17 lines)
Lines 38-43 Link Here
38
          type: array
38
          type: array
39
          items:
39
          items:
40
            "$ref": "../swagger.yaml#/definitions/item_group"
40
            "$ref": "../swagger.yaml#/definitions/item_group"
41
      '400':
42
        description: |
43
          Bad request. Possible `error_code` attribute values:
44
45
            * `invalid_query`
46
        schema:
47
          $ref: "../swagger.yaml#/definitions/error"
41
      '401':
48
      '401':
42
        description: Authentication required
49
        description: Authentication required
43
        schema:
50
        schema:
Lines 91-97 Link Here
91
        schema:
98
        schema:
92
          "$ref": "../swagger.yaml#/definitions/item_group"
99
          "$ref": "../swagger.yaml#/definitions/item_group"
93
      '400':
100
      '400':
94
        description: Bad parameter
101
        description: Bad request
95
        schema:
102
        schema:
96
          "$ref": "../swagger.yaml#/definitions/error"
103
          "$ref": "../swagger.yaml#/definitions/error"
97
      '401':
104
      '401':
Lines 157-163 Link Here
157
        schema:
164
        schema:
158
          "$ref": "../swagger.yaml#/definitions/item_group"
165
          "$ref": "../swagger.yaml#/definitions/item_group"
159
      '400':
166
      '400':
160
        description: Missing or wrong parameters
167
        description: Bad request
161
        schema:
168
        schema:
162
          "$ref": "../swagger.yaml#/definitions/error"
169
          "$ref": "../swagger.yaml#/definitions/error"
163
      '404':
170
      '404':
Lines 274-279 Link Here
274
        description: ItemGroup deleted
281
        description: ItemGroup deleted
275
        schema:
282
        schema:
276
          type: string
283
          type: string
284
      '400':
285
        description: Bad request
286
        schema:
287
          $ref: "../swagger.yaml#/definitions/error"
277
      '401':
288
      '401':
278
        description: Authentication required
289
        description: Authentication required
279
        schema:
290
        schema:
Lines 398-403 Link Here
398
        description: Item unlinked from item group
409
        description: Item unlinked from item group
399
        schema:
410
        schema:
400
          type: string
411
          type: string
412
      '400':
413
        description: Bad request
414
        schema:
415
          $ref: "../swagger.yaml#/definitions/error"
401
      '401':
416
      '401':
402
        description: Authentication required
417
        description: Authentication required
403
        schema:
418
        schema:
(-)a/api/v1/swagger/paths/cash_registers.yaml (+11 lines)
Lines 35-40 Link Here
35
          type: array
35
          type: array
36
          items:
36
          items:
37
            $ref: "../swagger.yaml#/definitions/cashup"
37
            $ref: "../swagger.yaml#/definitions/cashup"
38
      "400":
39
        description: |
40
          Bad request. Possible `error_code` attribute values:
41
42
            * `invalid_query`
43
        schema:
44
          $ref: "../swagger.yaml#/definitions/error"
38
      "403":
45
      "403":
39
        description: Access forbidden
46
        description: Access forbidden
40
        schema:
47
        schema:
Lines 83-88 Link Here
83
        description: A cashup
90
        description: A cashup
84
        schema:
91
        schema:
85
          $ref: "../swagger.yaml#/definitions/cashup"
92
          $ref: "../swagger.yaml#/definitions/cashup"
93
      "400":
94
        description: Bad request
95
        schema:
96
          $ref: "../swagger.yaml#/definitions/error"
86
      "403":
97
      "403":
87
        description: Access forbidden
98
        description: Access forbidden
88
        schema:
99
        schema:
(-)a/api/v1/swagger/paths/checkouts.yaml (+27 lines)
Lines 39-44 Link Here
39
        description: A list of checkouts
39
        description: A list of checkouts
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/checkouts"
41
          $ref: "../swagger.yaml#/definitions/checkouts"
42
      "400":
43
        description: |
44
          Bad request. Possible `error_code` attribute values:
45
46
            * `invalid_query`
47
        schema:
48
          $ref: "../swagger.yaml#/definitions/error"
42
      "403":
49
      "403":
43
        description: Access forbidden
50
        description: Access forbidden
44
        schema:
51
        schema:
Lines 88-93 Link Here
88
        description: Updated borrower's checkout
95
        description: Updated borrower's checkout
89
        schema:
96
        schema:
90
          $ref: "../swagger.yaml#/definitions/checkout"
97
          $ref: "../swagger.yaml#/definitions/checkout"
98
      "400":
99
        description: Bad request
100
        schema:
101
          $ref: "../swagger.yaml#/definitions/error"
91
      "403":
102
      "403":
92
        description: Access forbidden
103
        description: Access forbidden
93
        schema:
104
        schema:
Lines 127-132 Link Here
127
        description: Updated borrower's checkout
138
        description: Updated borrower's checkout
128
        schema:
139
        schema:
129
          $ref: "../swagger.yaml#/definitions/checkout"
140
          $ref: "../swagger.yaml#/definitions/checkout"
141
      "400":
142
        description: Bad request
143
        schema:
144
          $ref: "../swagger.yaml#/definitions/error"
130
      "403":
145
      "403":
131
        description: Cannot renew checkout
146
        description: Cannot renew checkout
132
        schema:
147
        schema:
Lines 166-171 Link Here
166
        description: Updated borrower's checkout
181
        description: Updated borrower's checkout
167
        schema:
182
        schema:
168
          $ref: "../swagger.yaml#/definitions/checkout"
183
          $ref: "../swagger.yaml#/definitions/checkout"
184
      "400":
185
        description: Bad request
186
        schema:
187
          $ref: "../swagger.yaml#/definitions/error"
169
      "403":
188
      "403":
170
        description: Cannot renew checkout
189
        description: Cannot renew checkout
171
        schema:
190
        schema:
Lines 213-218 Link Here
213
        description: List of checkouts renewals
232
        description: List of checkouts renewals
214
        schema:
233
        schema:
215
          $ref: "../swagger.yaml#/definitions/renewals"
234
          $ref: "../swagger.yaml#/definitions/renewals"
235
      "400":
236
        description: Bad request
237
        schema:
238
          $ref: "../swagger.yaml#/definitions/error"
216
      "403":
239
      "403":
217
        description: Access forbidden
240
        description: Access forbidden
218
        schema:
241
        schema:
Lines 251-256 Link Here
251
        description: Checkout renewability information
274
        description: Checkout renewability information
252
        schema:
275
        schema:
253
          $ref: "../swagger.yaml#/definitions/allows_renewal"
276
          $ref: "../swagger.yaml#/definitions/allows_renewal"
277
      "400":
278
        description: Bad request
279
        schema:
280
          $ref: "../swagger.yaml#/definitions/error"
254
      "403":
281
      "403":
255
        description: Forbidden
282
        description: Forbidden
256
        schema:
283
        schema:
(-)a/api/v1/swagger/paths/circulation-rules.yaml (+4 lines)
Lines 15-20 Link Here
15
          type: object
15
          type: object
16
          additionalProperties:
16
          additionalProperties:
17
            $ref: "../swagger.yaml#/definitions/circ-rule-kind"
17
            $ref: "../swagger.yaml#/definitions/circ-rule-kind"
18
      "400":
19
        description: Bad request
20
        schema:
21
          $ref: "../swagger.yaml#/definitions/error"
18
      "403":
22
      "403":
19
        description: Access forbidden
23
        description: Access forbidden
20
        schema:
24
        schema:
(-)a/api/v1/swagger/paths/cities.yaml (+23 lines)
Lines 44-49 Link Here
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/city"
46
            $ref: "../swagger.yaml#/definitions/city"
47
      "400":
48
        description: |
49
          Bad request. Possible `error_code` attribute values:
50
51
            * `invalid_query`
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
47
      "403":
54
      "403":
48
        description: Access forbidden
55
        description: Access forbidden
49
        schema:
56
        schema:
Lines 82-87 Link Here
82
        description: City added
89
        description: City added
83
        schema:
90
        schema:
84
          $ref: "../swagger.yaml#/definitions/city"
91
          $ref: "../swagger.yaml#/definitions/city"
92
      "400":
93
        description: Bad request
94
        schema:
95
          $ref: "../swagger.yaml#/definitions/error"
85
      "401":
96
      "401":
86
        description: Authentication required
97
        description: Authentication required
87
        schema:
98
        schema:
Lines 120-125 Link Here
120
        description: A city
131
        description: A city
121
        schema:
132
        schema:
122
          $ref: "../swagger.yaml#/definitions/city"
133
          $ref: "../swagger.yaml#/definitions/city"
134
      "400":
135
        description: Bad request
136
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
123
      "404":
138
      "404":
124
        description: City not found
139
        description: City not found
125
        schema:
140
        schema:
Lines 159-164 Link Here
159
        description: A city
174
        description: A city
160
        schema:
175
        schema:
161
          $ref: "../swagger.yaml#/definitions/city"
176
          $ref: "../swagger.yaml#/definitions/city"
177
      "400":
178
        description: Bad request
179
        schema:
180
          $ref: "../swagger.yaml#/definitions/error"
162
      "401":
181
      "401":
163
        description: Authentication required
182
        description: Authentication required
164
        schema:
183
        schema:
Lines 195-200 Link Here
195
    responses:
214
    responses:
196
      "204":
215
      "204":
197
        description: City deleted
216
        description: City deleted
217
      "400":
218
        description: Bad request
219
        schema:
220
          $ref: "../swagger.yaml#/definitions/error"
198
      "401":
221
      "401":
199
        description: Authentication required
222
        description: Authentication required
200
        schema:
223
        schema:
(-)a/api/v1/swagger/paths/clubs.yaml (-1 / +1 lines)
Lines 61-67 Link Here
61
        schema:
61
        schema:
62
          $ref: "../definitions/club_hold.yaml"
62
          $ref: "../definitions/club_hold.yaml"
63
      "400":
63
      "400":
64
        description: Missing or wrong parameters
64
        description: Bad request
65
        schema:
65
        schema:
66
          $ref: "../swagger.yaml#/definitions/error"
66
          $ref: "../swagger.yaml#/definitions/error"
67
      "401":
67
      "401":
(-)a/api/v1/swagger/paths/config_smtp_servers.yaml (+23 lines)
Lines 24-29 Link Here
24
          type: array
24
          type: array
25
          items:
25
          items:
26
            $ref: "../swagger.yaml#/definitions/smtp_server"
26
            $ref: "../swagger.yaml#/definitions/smtp_server"
27
      "400":
28
        description: |
29
          Bad request. Possible `error_code` attribute values:
30
31
            * `invalid_query`
32
        schema:
33
          $ref: "../swagger.yaml#/definitions/error"
27
      "403":
34
      "403":
28
        description: Access forbidden
35
        description: Access forbidden
29
        schema:
36
        schema:
Lines 62-67 Link Here
62
        description: An SMTP server object
69
        description: An SMTP server object
63
        schema:
70
        schema:
64
          $ref: "../swagger.yaml#/definitions/smtp_server"
71
          $ref: "../swagger.yaml#/definitions/smtp_server"
72
      "400":
73
        description: Bad request
74
        schema:
75
          $ref: "../swagger.yaml#/definitions/error"
65
      "401":
76
      "401":
66
        description: Authentication required
77
        description: Authentication required
67
        schema:
78
        schema:
Lines 104-109 Link Here
104
        description: An SMTP server object
115
        description: An SMTP server object
105
        schema:
116
        schema:
106
          $ref: "../swagger.yaml#/definitions/smtp_server"
117
          $ref: "../swagger.yaml#/definitions/smtp_server"
118
      "400":
119
        description: Bad request
120
        schema:
121
          $ref: "../swagger.yaml#/definitions/error"
107
      "404":
122
      "404":
108
        description: Object not found
123
        description: Object not found
109
        schema:
124
        schema:
Lines 147-152 Link Here
147
        description: An SMTP server object
162
        description: An SMTP server object
148
        schema:
163
        schema:
149
          $ref: "../swagger.yaml#/definitions/smtp_server"
164
          $ref: "../swagger.yaml#/definitions/smtp_server"
165
      "400":
166
        description: Bad request
167
        schema:
168
          $ref: "../swagger.yaml#/definitions/error"
150
      "401":
169
      "401":
151
        description: Authentication required
170
        description: Authentication required
152
        schema:
171
        schema:
Lines 186-191 Link Here
186
    responses:
205
    responses:
187
      "204":
206
      "204":
188
        description: SMTP server deleted
207
        description: SMTP server deleted
208
      "400":
209
        description: Bad request
210
        schema:
211
          $ref: "../swagger.yaml#/definitions/error"
189
      "401":
212
      "401":
190
        description: Authentication required
213
        description: Authentication required
191
        schema:
214
        schema:
(-)a/api/v1/swagger/paths/erm_agreements.yaml (-5 / +12 lines)
Lines 84-91 Link Here
84
          items:
84
          items:
85
            $ref: "../swagger.yaml#/definitions/erm_agreement"
85
            $ref: "../swagger.yaml#/definitions/erm_agreement"
86
          type: array
86
          type: array
87
      400:
87
      "400":
88
        description: Bad request
88
        description: |
89
          Bad request. Possible `error_code` attribute values:
90
91
            * `invalid_query`
89
        schema:
92
        schema:
90
          $ref: "../swagger.yaml#/definitions/error"
93
          $ref: "../swagger.yaml#/definitions/error"
91
      403:
94
      403:
Lines 129-135 Link Here
129
          items:
132
          items:
130
            $ref: "../swagger.yaml#/definitions/erm_agreement"
133
            $ref: "../swagger.yaml#/definitions/erm_agreement"
131
      400:
134
      400:
132
        description: Bad parameter
135
        description: Bad request
133
        schema:
136
        schema:
134
          $ref: "../swagger.yaml#/definitions/error"
137
          $ref: "../swagger.yaml#/definitions/error"
135
      401:
138
      401:
Lines 203-208 Link Here
203
        schema:
206
        schema:
204
          items:
207
          items:
205
            $ref: "../swagger.yaml#/definitions/erm_agreement"
208
            $ref: "../swagger.yaml#/definitions/erm_agreement"
209
      400:
210
        description: Bad request
211
        schema:
212
          $ref: "../swagger.yaml#/definitions/error"
206
      401:
213
      401:
207
        description: Authentication required
214
        description: Authentication required
208
        schema:
215
        schema:
Lines 267-273 Link Here
267
          items:
274
          items:
268
            $ref: "../swagger.yaml#/definitions/erm_agreement"
275
            $ref: "../swagger.yaml#/definitions/erm_agreement"
269
      400:
276
      400:
270
        description: Bad parameter
277
        description: Bad request
271
        schema:
278
        schema:
272
          $ref: "../swagger.yaml#/definitions/error"
279
          $ref: "../swagger.yaml#/definitions/error"
273
      403:
280
      403:
Lines 313-319 Link Here
313
      204:
320
      204:
314
        description: Agreement deleted
321
        description: Agreement deleted
315
      400:
322
      400:
316
        description: Agreement deletion failed
323
        description: Bad request
317
        schema:
324
        schema:
318
          $ref: "../swagger.yaml#/definitions/error"
325
          $ref: "../swagger.yaml#/definitions/error"
319
      401:
326
      401:
(-)a/api/v1/swagger/paths/erm_config.yaml (-1 / +4 lines)
Lines 15-21 Link Here
15
        schema:
15
        schema:
16
          $ref: "../swagger.yaml#/definitions/erm_config"
16
          $ref: "../swagger.yaml#/definitions/erm_config"
17
      400:
17
      400:
18
        description: Bad request
18
        description: |
19
          Bad request. Possible `error_code` attribute values:
20
21
            * `invalid_query`
19
        schema:
22
        schema:
20
          $ref: "../swagger.yaml#/definitions/error"
23
          $ref: "../swagger.yaml#/definitions/error"
21
      403:
24
      403:
(-)a/api/v1/swagger/paths/erm_documents.yaml (+4 lines)
Lines 19-24 Link Here
19
        description: Anagreement
19
        description: Anagreement
20
        schema:
20
        schema:
21
          type: file
21
          type: file
22
      "400":
23
        description: Bad request
24
        schema:
25
          $ref: "../swagger.yaml#/definitions/error"
22
      401:
26
      401:
23
        description: Authentication required
27
        description: Authentication required
24
        schema:
28
        schema:
(-)a/api/v1/swagger/paths/erm_eholdings_packages.yaml (-5 / +16 lines)
Lines 81-88 Link Here
81
          items:
81
          items:
82
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
82
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
83
          type: array
83
          type: array
84
      400:
84
      "400":
85
        description: Bad request
85
        description: |
86
          Bad request. Possible `error_code` attribute values:
87
88
            * `invalid_query`
86
        schema:
89
        schema:
87
          $ref: "../swagger.yaml#/definitions/error"
90
          $ref: "../swagger.yaml#/definitions/error"
88
      403:
91
      403:
Lines 131-137 Link Here
131
          items:
134
          items:
132
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
135
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
133
      400:
136
      400:
134
        description: Bad parameter
137
        description: Bad request
135
        schema:
138
        schema:
136
          $ref: "../swagger.yaml#/definitions/error"
139
          $ref: "../swagger.yaml#/definitions/error"
137
      401:
140
      401:
Lines 198-203 Link Here
198
        schema:
201
        schema:
199
          items:
202
          items:
200
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
203
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
204
      "400":
205
        description: Bad request
206
        schema:
207
          $ref: "../swagger.yaml#/definitions/error"
201
      401:
208
      401:
202
        description: Authentication required
209
        description: Authentication required
203
        schema:
210
        schema:
Lines 264-270 Link Here
264
          items:
271
          items:
265
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
272
            $ref: "../swagger.yaml#/definitions/erm_eholdings_package"
266
      400:
273
      400:
267
        description: Bad parameter
274
        description: Bad request
268
        schema:
275
        schema:
269
          $ref: "../swagger.yaml#/definitions/error"
276
          $ref: "../swagger.yaml#/definitions/error"
270
      403:
277
      403:
Lines 311-317 Link Here
311
      204:
318
      204:
312
        description: package deleted
319
        description: package deleted
313
      400:
320
      400:
314
        description: package deletion failed
321
        description: Bad request
315
        schema:
322
        schema:
316
          $ref: "../swagger.yaml#/definitions/error"
323
          $ref: "../swagger.yaml#/definitions/error"
317
      401:
324
      401:
Lines 379-384 Link Here
379
              description: Add or remove this package from remote holdings
386
              description: Add or remove this package from remote holdings
380
              type: boolean
387
              type: boolean
381
          additionalProperties: false
388
          additionalProperties: false
389
      400:
390
        description: Bad request
391
        schema:
392
          $ref: "../swagger.yaml#/definitions/error"
382
      401:
393
      401:
383
        description: Authentication required
394
        description: Authentication required
384
        schema:
395
        schema:
(-)a/api/v1/swagger/paths/erm_eholdings_packages_resources.yaml (-2 / +5 lines)
Lines 59-66 Link Here
59
          items:
59
          items:
60
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
60
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
61
          type: array
61
          type: array
62
      400:
62
      "400":
63
        description: Bad request
63
        description: |
64
          Bad request. Possible `error_code` attribute values:
65
66
            * `invalid_query`
64
        schema:
67
        schema:
65
          $ref: "../swagger.yaml#/definitions/error"
68
          $ref: "../swagger.yaml#/definitions/error"
66
      403:
69
      403:
(-)a/api/v1/swagger/paths/erm_eholdings_resources.yaml (-2 / +13 lines)
Lines 58-65 Link Here
58
          items:
58
          items:
59
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
59
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
60
          type: array
60
          type: array
61
      400:
61
      "400":
62
        description: Bad request
62
        description: |
63
          Bad request. Possible `error_code` attribute values:
64
65
            * `invalid_query`
63
        schema:
66
        schema:
64
          $ref: "../swagger.yaml#/definitions/error"
67
          $ref: "../swagger.yaml#/definitions/error"
65
      403:
68
      403:
Lines 113-118 Link Here
113
        schema:
116
        schema:
114
          items:
117
          items:
115
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
118
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
119
      "400":
120
        description: Bad request
121
        schema:
122
          $ref: "../swagger.yaml#/definitions/error"
116
      401:
123
      401:
117
        description: Authentication required
124
        description: Authentication required
118
        schema:
125
        schema:
Lines 174-179 Link Here
174
              description: Add or remove this resource from remote holdings
181
              description: Add or remove this resource from remote holdings
175
              type: boolean
182
              type: boolean
176
          additionalProperties: false
183
          additionalProperties: false
184
      "400":
185
        description: Bad request
186
        schema:
187
          $ref: "../swagger.yaml#/definitions/error"
177
      401:
188
      401:
178
        description: Authentication required
189
        description: Authentication required
179
        schema:
190
        schema:
(-)a/api/v1/swagger/paths/erm_eholdings_titles.yaml (-6 / +13 lines)
Lines 168-175 Link Here
168
          items:
168
          items:
169
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
169
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
170
          type: array
170
          type: array
171
      400:
171
      "400":
172
        description: Bad request
172
        description: |
173
          Bad request. Possible `error_code` attribute values:
174
175
            * `invalid_query`
173
        schema:
176
        schema:
174
          $ref: "../swagger.yaml#/definitions/error"
177
          $ref: "../swagger.yaml#/definitions/error"
175
      403:
178
      403:
Lines 218-224 Link Here
218
          items:
221
          items:
219
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
222
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
220
      400:
223
      400:
221
        description: Bad parameter
224
        description: Bad request
222
        schema:
225
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
226
          $ref: "../swagger.yaml#/definitions/error"
224
      401:
227
      401:
Lines 283-288 Link Here
283
        schema:
286
        schema:
284
          items:
287
          items:
285
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
288
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
289
      "400":
290
        description: Bad request
291
        schema:
292
          $ref: "../swagger.yaml#/definitions/error"
286
      401:
293
      401:
287
        description: Authentication required
294
        description: Authentication required
288
        schema:
295
        schema:
Lines 349-355 Link Here
349
          items:
356
          items:
350
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
357
            $ref: "../swagger.yaml#/definitions/erm_eholdings_title"
351
      400:
358
      400:
352
        description: Bad parameter
359
        description: Bad request
353
        schema:
360
        schema:
354
          $ref: "../swagger.yaml#/definitions/error"
361
          $ref: "../swagger.yaml#/definitions/error"
355
      403:
362
      403:
Lines 396-402 Link Here
396
      204:
403
      204:
397
        description: title deleted
404
        description: title deleted
398
      400:
405
      400:
399
        description: title deletion failed
406
        description: Bad request
400
        schema:
407
        schema:
401
          $ref: "../swagger.yaml#/definitions/error"
408
          $ref: "../swagger.yaml#/definitions/error"
402
      401:
409
      401:
Lines 462-468 Link Here
462
              type: string
469
              type: string
463
          additionalProperties: false
470
          additionalProperties: false
464
      400:
471
      400:
465
        description: Bad parameter
472
        description: Bad request
466
        schema:
473
        schema:
467
          $ref: "../swagger.yaml#/definitions/error"
474
          $ref: "../swagger.yaml#/definitions/error"
468
      401:
475
      401:
(-)a/api/v1/swagger/paths/erm_eholdings_titles_resources.yaml (-2 / +5 lines)
Lines 59-66 Link Here
59
          items:
59
          items:
60
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
60
            $ref: "../swagger.yaml#/definitions/erm_eholdings_resource"
61
          type: array
61
          type: array
62
      400:
62
      "400":
63
        description: Bad request
63
        description: |
64
          Bad request. Possible `error_code` attribute values:
65
66
            * `invalid_query`
64
        schema:
67
        schema:
65
          $ref: "../swagger.yaml#/definitions/error"
68
          $ref: "../swagger.yaml#/definitions/error"
66
      403:
69
      403:
(-)a/api/v1/swagger/paths/erm_licenses.yaml (-5 / +12 lines)
Lines 67-74 Link Here
67
          items:
67
          items:
68
            $ref: "../swagger.yaml#/definitions/erm_license"
68
            $ref: "../swagger.yaml#/definitions/erm_license"
69
          type: array
69
          type: array
70
      400:
70
      "400":
71
        description: Bad request
71
        description: |
72
          Bad request. Possible `error_code` attribute values:
73
74
            * `invalid_query`
72
        schema:
75
        schema:
73
          $ref: "../swagger.yaml#/definitions/error"
76
          $ref: "../swagger.yaml#/definitions/error"
74
      403:
77
      403:
Lines 112-118 Link Here
112
          items:
115
          items:
113
            $ref: "../swagger.yaml#/definitions/erm_license"
116
            $ref: "../swagger.yaml#/definitions/erm_license"
114
      400:
117
      400:
115
        description: Bad parameter
118
        description: Bad request
116
        schema:
119
        schema:
117
          $ref: "../swagger.yaml#/definitions/error"
120
          $ref: "../swagger.yaml#/definitions/error"
118
      401:
121
      401:
Lines 178-183 Link Here
178
        schema:
181
        schema:
179
          items:
182
          items:
180
            $ref: "../swagger.yaml#/definitions/erm_license"
183
            $ref: "../swagger.yaml#/definitions/erm_license"
184
      "400":
185
        description: Bad request
186
        schema:
187
          $ref: "../swagger.yaml#/definitions/error"
181
      401:
188
      401:
182
        description: authentication required
189
        description: authentication required
183
        schema:
190
        schema:
Lines 239-245 Link Here
239
          items:
246
          items:
240
            $ref: "../swagger.yaml#/definitions/erm_license"
247
            $ref: "../swagger.yaml#/definitions/erm_license"
241
      400:
248
      400:
242
        description: bad parameter
249
        description: Bad request
243
        schema:
250
        schema:
244
          $ref: "../swagger.yaml#/definitions/error"
251
          $ref: "../swagger.yaml#/definitions/error"
245
      403:
252
      403:
Lines 285-291 Link Here
285
      204:
292
      204:
286
        description: license deleted
293
        description: license deleted
287
      400:
294
      400:
288
        description: license deletion failed
295
        description: Bad request
289
        schema:
296
        schema:
290
          $ref: "../swagger.yaml#/definitions/error"
297
          $ref: "../swagger.yaml#/definitions/error"
291
      401:
298
      401:
(-)a/api/v1/swagger/paths/erm_users.yaml (-2 / +5 lines)
Lines 34-41 Link Here
34
          type: array
34
          type: array
35
          items:
35
          items:
36
            $ref: "../swagger.yaml#/definitions/patron"
36
            $ref: "../swagger.yaml#/definitions/patron"
37
      400:
37
      "400":
38
        description: Bad request
38
        description: |
39
          Bad request. Possible `error_code` attribute values:
40
41
            * `invalid_query`
39
        schema:
42
        schema:
40
          $ref: "../swagger.yaml#/definitions/error"
43
          $ref: "../swagger.yaml#/definitions/error"
41
      403:
44
      403:
(-)a/api/v1/swagger/paths/holds.yaml (-7 / +25 lines)
Lines 106-111 Link Here
106
        description: A list of holds
106
        description: A list of holds
107
        schema:
107
        schema:
108
          $ref: "../swagger.yaml#/definitions/holds"
108
          $ref: "../swagger.yaml#/definitions/holds"
109
      "400":
110
        description: |
111
          Bad request. Possible `error_code` attribute values:
112
113
            * `invalid_query`
114
        schema:
115
          $ref: "../swagger.yaml#/definitions/error"
109
      "401":
116
      "401":
110
        description: Authentication required
117
        description: Authentication required
111
        schema:
118
        schema:
Lines 218-224 Link Here
218
        schema:
225
        schema:
219
          $ref: "../swagger.yaml#/definitions/hold"
226
          $ref: "../swagger.yaml#/definitions/hold"
220
      "400":
227
      "400":
221
        description: Missing or wrong parameters
228
        description: Bad request
222
        schema:
229
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
230
          $ref: "../swagger.yaml#/definitions/error"
224
      "401":
231
      "401":
Lines 285-291 Link Here
285
        schema:
292
        schema:
286
          $ref: "../swagger.yaml#/definitions/hold"
293
          $ref: "../swagger.yaml#/definitions/hold"
287
      "400":
294
      "400":
288
        description: Missing or wrong parameters
295
        description: Bad request
289
        schema:
296
        schema:
290
          $ref: "../swagger.yaml#/definitions/error"
297
          $ref: "../swagger.yaml#/definitions/error"
291
      "401":
298
      "401":
Lines 353-359 Link Here
353
        schema:
360
        schema:
354
          $ref: "../swagger.yaml#/definitions/hold"
361
          $ref: "../swagger.yaml#/definitions/hold"
355
      "400":
362
      "400":
356
        description: Missing or wrong parameters
363
        description: Bad request
357
        schema:
364
        schema:
358
          $ref: "../swagger.yaml#/definitions/error"
365
          $ref: "../swagger.yaml#/definitions/error"
359
      "401":
366
      "401":
Lines 407-412 Link Here
407
        description: Hold request recorded
414
        description: Hold request recorded
408
      "204":
415
      "204":
409
        description: Hold deleted
416
        description: Hold deleted
417
      "400":
418
        description: Bad request
419
        schema:
420
          $ref: "../swagger.yaml#/definitions/error"
410
      "401":
421
      "401":
411
        description: Authentication required
422
        description: Authentication required
412
        schema:
423
        schema:
Lines 455-460 Link Here
455
        description: The new priority value for the hold
466
        description: The new priority value for the hold
456
        schema:
467
        schema:
457
          type: integer
468
          type: integer
469
      "400":
470
        description: Bad request
471
        schema:
472
          $ref: "../swagger.yaml#/definitions/error"
458
      "401":
473
      "401":
459
        description: Authentication required
474
        description: Authentication required
460
        schema:
475
        schema:
Lines 514-520 Link Here
514
      "201":
529
      "201":
515
        description: Hold suspended
530
        description: Hold suspended
516
      "400":
531
      "400":
517
        description: Missing or wrong parameters
532
        description: Bad request
518
        schema:
533
        schema:
519
          $ref: "../swagger.yaml#/definitions/error"
534
          $ref: "../swagger.yaml#/definitions/error"
520
      "401":
535
      "401":
Lines 559-565 Link Here
559
      "204":
574
      "204":
560
        description: Hold resumed
575
        description: Hold resumed
561
      "400":
576
      "400":
562
        description: Missing or wrong parameters
577
        description: Bad request
563
        schema:
578
        schema:
564
          $ref: "../swagger.yaml#/definitions/error"
579
          $ref: "../swagger.yaml#/definitions/error"
565
      "401":
580
      "401":
Lines 625-631 Link Here
625
          items:
640
          items:
626
            $ref: "../swagger.yaml#/definitions/library"
641
            $ref: "../swagger.yaml#/definitions/library"
627
      "400":
642
      "400":
628
        description: Missing or wrong parameters
643
        description: |
644
          Bad request. Possible `error_code` attribute values:
645
646
            * `invalid_query`
629
        schema:
647
        schema:
630
          $ref: "../swagger.yaml#/definitions/error"
648
          $ref: "../swagger.yaml#/definitions/error"
631
      "401":
649
      "401":
Lines 688-694 Link Here
688
              description: Internal identifier for the pickup library
706
              description: Internal identifier for the pickup library
689
          additionalProperties: false
707
          additionalProperties: false
690
      "400":
708
      "400":
691
        description: Missing or wrong parameters
709
        description: Bad request
692
        schema:
710
        schema:
693
          $ref: "../swagger.yaml#/definitions/error"
711
          $ref: "../swagger.yaml#/definitions/error"
694
      "401":
712
      "401":
(-)a/api/v1/swagger/paths/ill_backends.yaml (-1 / +9 lines)
Lines 14-19 Link Here
14
        description: A list of ILL backends
14
        description: A list of ILL backends
15
        schema:
15
        schema:
16
          $ref: "../swagger.yaml#/definitions/ill_backends"
16
          $ref: "../swagger.yaml#/definitions/ill_backends"
17
      "400":
18
        description: Bad request
19
        schema:
20
          $ref: "../swagger.yaml#/definitions/error"
17
      "401":
21
      "401":
18
        description: Authentication required
22
        description: Authentication required
19
        schema:
23
        schema:
Lines 70-75 Link Here
70
        description: An ILL backends
74
        description: An ILL backends
71
        schema:
75
        schema:
72
          $ref: "../swagger.yaml#/definitions/ill_backend"
76
          $ref: "../swagger.yaml#/definitions/ill_backend"
77
      "400":
78
        description: Bad request
79
        schema:
80
          $ref: "../swagger.yaml#/definitions/error"
73
      "401":
81
      "401":
74
        description: Authentication required
82
        description: Authentication required
75
        schema:
83
        schema:
Lines 95-98 Link Here
95
          $ref: "../swagger.yaml#/definitions/error"
103
          $ref: "../swagger.yaml#/definitions/error"
96
    x-koha-authorization:
104
    x-koha-authorization:
97
      permissions:
105
      permissions:
98
        ill: "1"
106
        ill: "1"
(-)a/api/v1/swagger/paths/ill_requests.yaml (+7 lines)
Lines 41-46 Link Here
41
          type: array
41
          type: array
42
          items:
42
          items:
43
            $ref: "../swagger.yaml#/definitions/ill_request"
43
            $ref: "../swagger.yaml#/definitions/ill_request"
44
      "400":
45
        description: |
46
          Bad request. Possible `error_code` attribute values:
47
48
            * `invalid_query`
49
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
44
      "403":
51
      "403":
45
        description: Access forbidden
52
        description: Access forbidden
46
        schema:
53
        schema:
(-)a/api/v1/swagger/paths/import_batch_profiles.yaml (-2 / +13 lines)
Lines 29-34 Link Here
29
        description: A list of import batch profiles
29
        description: A list of import batch profiles
30
        schema:
30
        schema:
31
          $ref: "../swagger.yaml#/definitions/import_batch_profiles"
31
          $ref: "../swagger.yaml#/definitions/import_batch_profiles"
32
      "400":
33
        description: |
34
          Bad request. Possible `error_code` attribute values:
35
36
            * `invalid_query`
37
        schema:
38
          $ref: "../swagger.yaml#/definitions/error"
32
      "401":
39
      "401":
33
        description: Authentication required
40
        description: Authentication required
34
        schema:
41
        schema:
Lines 129-135 Link Here
129
        schema:
136
        schema:
130
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
137
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
131
      "400":
138
      "400":
132
        description: Missing or wrong parameters
139
        description: Bad request
133
        schema:
140
        schema:
134
          $ref: "../swagger.yaml#/definitions/error"
141
          $ref: "../swagger.yaml#/definitions/error"
135
      "401":
142
      "401":
Lines 238-244 Link Here
238
        schema:
245
        schema:
239
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
246
          $ref: "../swagger.yaml#/definitions/import_batch_profile"
240
      "400":
247
      "400":
241
        description: Missing or wrong parameters
248
        description: Bad request
242
        schema:
249
        schema:
243
          $ref: "../swagger.yaml#/definitions/error"
250
          $ref: "../swagger.yaml#/definitions/error"
244
      "401":
251
      "401":
Lines 280-285 Link Here
280
    responses:
287
    responses:
281
      "204":
288
      "204":
282
        description: Profile deleted
289
        description: Profile deleted
290
      "400":
291
        description: Bad request
292
        schema:
293
          $ref: "../swagger.yaml#/definitions/error"
283
      "401":
294
      "401":
284
        description: Authentication required
295
        description: Authentication required
285
        schema:
296
        schema:
(-)a/api/v1/swagger/paths/import_batches.yaml (-1 / +5 lines)
Lines 36-42 Link Here
36
      "200":
36
      "200":
37
        description: Match updated
37
        description: Match updated
38
      "400":
38
      "400":
39
        description: Missing or wrong parameters
39
        description: Bad request
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: "../swagger.yaml#/definitions/error"
42
      "401":
42
      "401":
Lines 87-92 Link Here
87
    responses:
87
    responses:
88
      "204":
88
      "204":
89
        description: Matches unchosen
89
        description: Matches unchosen
90
      "400":
91
        description: Bad request
92
        schema:
93
          $ref: "../swagger.yaml#/definitions/error"
90
      "401":
94
      "401":
91
        description: Authentication required
95
        description: Authentication required
92
        schema:
96
        schema:
(-)a/api/v1/swagger/paths/items.yaml (-4 / +21 lines)
Lines 42-47 Link Here
42
          type: array
42
          type: array
43
          items:
43
          items:
44
            $ref: "../swagger.yaml#/definitions/item"
44
            $ref: "../swagger.yaml#/definitions/item"
45
      "400":
46
        description: |
47
          Bad request. Possible `error_code` attribute values:
48
49
            * `invalid_query`
50
        schema:
51
          $ref: "../swagger.yaml#/definitions/error"
45
      "401":
52
      "401":
46
        description: Authentication required
53
        description: Authentication required
47
        schema:
54
        schema:
Lines 93-99 Link Here
93
        schema:
100
        schema:
94
          $ref: "../swagger.yaml#/definitions/item"
101
          $ref: "../swagger.yaml#/definitions/item"
95
      "400":
102
      "400":
96
        description: Missing or wrong parameters
103
        description: Bad request
97
        schema:
104
        schema:
98
          $ref: "../swagger.yaml#/definitions/error"
105
          $ref: "../swagger.yaml#/definitions/error"
99
      "404":
106
      "404":
Lines 140-146 Link Here
140
          items:
147
          items:
141
            $ref: "../swagger.yaml#/definitions/item"
148
            $ref: "../swagger.yaml#/definitions/item"
142
      "400":
149
      "400":
143
        description: Bad parameter
150
        description: Bad request
144
        schema:
151
        schema:
145
          $ref: "../swagger.yaml#/definitions/error"
152
          $ref: "../swagger.yaml#/definitions/error"
146
      "401":
153
      "401":
Lines 215-220 Link Here
215
          type: array
222
          type: array
216
          items:
223
          items:
217
            $ref: "../swagger.yaml#/definitions/item"
224
            $ref: "../swagger.yaml#/definitions/item"
225
      "400":
226
        description: |
227
          Bad request. Possible `error_code` attribute values:
228
229
            * `invalid_query`
230
        schema:
231
          $ref: "../swagger.yaml#/definitions/error"
218
      "401":
232
      "401":
219
        description: Authentication required
233
        description: Authentication required
220
        schema:
234
        schema:
Lines 256-262 Link Here
256
      "204":
270
      "204":
257
        description: Bundle link deleted
271
        description: Bundle link deleted
258
      "400":
272
      "400":
259
        description: Bad parameter
273
        description: Bad request
260
        schema:
274
        schema:
261
          $ref: "../swagger.yaml#/definitions/error"
275
          $ref: "../swagger.yaml#/definitions/error"
262
      "409":
276
      "409":
Lines 320-326 Link Here
320
          items:
334
          items:
321
            $ref: "../swagger.yaml#/definitions/library"
335
            $ref: "../swagger.yaml#/definitions/library"
322
      "400":
336
      "400":
323
        description: Missing or wrong parameters
337
        description: |
338
          Bad request. Possible `error_code` attribute values:
339
340
            * `invalid_query`
324
        schema:
341
        schema:
325
          $ref: "../swagger.yaml#/definitions/error"
342
          $ref: "../swagger.yaml#/definitions/error"
326
      "401":
343
      "401":
(-)a/api/v1/swagger/paths/jobs.yaml (+11 lines)
Lines 29-34 Link Here
29
          type: array
29
          type: array
30
          items:
30
          items:
31
            $ref: "../swagger.yaml#/definitions/job"
31
            $ref: "../swagger.yaml#/definitions/job"
32
      "400":
33
        description: |
34
          Bad request. Possible `error_code` attribute values:
35
36
            * `invalid_query`
37
        schema:
38
          $ref: "../swagger.yaml#/definitions/error"
32
      "403":
39
      "403":
33
        description: Access forbidden
40
        description: Access forbidden
34
        schema:
41
        schema:
Lines 63-68 Link Here
63
        description: A job
70
        description: A job
64
        schema:
71
        schema:
65
          $ref: "../swagger.yaml#/definitions/job"
72
          $ref: "../swagger.yaml#/definitions/job"
73
      "400":
74
        description: Bad request
75
        schema:
76
          $ref: "../swagger.yaml#/definitions/error"
66
      "403":
77
      "403":
67
        description: Access forbidden
78
        description: Access forbidden
68
        schema:
79
        schema:
(-)a/api/v1/swagger/paths/libraries.yaml (+26 lines)
Lines 114-119 Link Here
114
          type: array
114
          type: array
115
          items:
115
          items:
116
            $ref: "../swagger.yaml#/definitions/library"
116
            $ref: "../swagger.yaml#/definitions/library"
117
      "400":
118
        description: |
119
          Bad request. Possible `error_code` attribute values:
120
121
            * `invalid_query`
122
        schema:
123
          $ref: "../swagger.yaml#/definitions/error"
117
      "500":
124
      "500":
118
        description: |
125
        description: |
119
          Internal server error. Possible `error_code` attribute values:
126
          Internal server error. Possible `error_code` attribute values:
Lines 204-209 Link Here
204
        description: A library
211
        description: A library
205
        schema:
212
        schema:
206
          $ref: "../swagger.yaml#/definitions/library"
213
          $ref: "../swagger.yaml#/definitions/library"
214
      "400":
215
        description: Bad request
216
        schema:
217
          $ref: "../swagger.yaml#/definitions/error"
207
      "404":
218
      "404":
208
        description: Library not found
219
        description: Library not found
209
        schema:
220
        schema:
Lines 279-284 Link Here
279
        description: Library deleted
290
        description: Library deleted
280
        schema:
291
        schema:
281
          type: string
292
          type: string
293
      "400":
294
        description: Bad request
295
        schema:
296
          $ref: "../swagger.yaml#/definitions/error"
282
      "401":
297
      "401":
283
        description: Authentication required
298
        description: Authentication required
284
        schema:
299
        schema:
Lines 330-335 Link Here
330
          type: array
345
          type: array
331
          items:
346
          items:
332
            $ref: "../swagger.yaml#/definitions/library"
347
            $ref: "../swagger.yaml#/definitions/library"
348
      "400":
349
        description: |
350
          Bad request. Possible `error_code` attribute values:
351
352
            * `invalid_query`
353
        schema:
354
          $ref: "../swagger.yaml#/definitions/error"
333
      "500":
355
      "500":
334
        description: |
356
        description: |
335
          Internal server error. Possible `error_code` attribute values:
357
          Internal server error. Possible `error_code` attribute values:
Lines 355-360 Link Here
355
    responses:
377
    responses:
356
      "200":
378
      "200":
357
        description: A library
379
        description: A library
380
      "400":
381
        description: Bad request
382
        schema:
383
          $ref: "../swagger.yaml#/definitions/error"
358
      "401":
384
      "401":
359
        description: Authentication required
385
        description: Authentication required
360
        schema:
386
        schema:
(-)a/api/v1/swagger/paths/oauth.yaml (-2 / +2 lines)
Lines 36-42 Link Here
36
              type: integer
36
              type: integer
37
          additionalProperties: false
37
          additionalProperties: false
38
      "400":
38
      "400":
39
        description: Bad Request
39
        description: Bad request
40
        schema:
40
        schema:
41
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: "../swagger.yaml#/definitions/error"
42
      "403":
42
      "403":
Lines 108-114 Link Here
108
        schema:
108
        schema:
109
          type: string
109
          type: string
110
      "400":
110
      "400":
111
        description: Bad Request
111
        description: Bad request
112
        schema:
112
        schema:
113
          $ref: ../swagger.yaml#/definitions/error
113
          $ref: ../swagger.yaml#/definitions/error
114
      "403":
114
      "403":
(-)a/api/v1/swagger/paths/patrons.yaml (-3 / +26 lines)
Lines 368-373 Link Here
368
          type: array
368
          type: array
369
          items:
369
          items:
370
            $ref: "../swagger.yaml#/definitions/patron"
370
            $ref: "../swagger.yaml#/definitions/patron"
371
      "400":
372
        description: |
373
          Bad request. Possible `error_code` attribute values:
374
375
            * `invalid_query`
376
        schema:
377
          $ref: "../swagger.yaml#/definitions/error"
371
      "401":
378
      "401":
372
        description: Authentication required
379
        description: Authentication required
373
        schema:
380
        schema:
Lines 417-423 Link Here
417
          items:
424
          items:
418
            $ref: "../swagger.yaml#/definitions/patron"
425
            $ref: "../swagger.yaml#/definitions/patron"
419
      "400":
426
      "400":
420
        description: Bad parameter
427
        description: |
428
          Bad request. Possible `error_code` attribute values:
429
430
            * `invalid_attribute_type`
431
            * `attribute_not_unique`
432
            * `non_repeatable_attribute`
433
            * `missing_mandatory_attribute`
421
        schema:
434
        schema:
422
          $ref: "../swagger.yaml#/definitions/error"
435
          $ref: "../swagger.yaml#/definitions/error"
423
      "401":
436
      "401":
Lines 476-481 Link Here
476
        description: A patron
489
        description: A patron
477
        schema:
490
        schema:
478
          $ref: "../swagger.yaml#/definitions/patron"
491
          $ref: "../swagger.yaml#/definitions/patron"
492
      "400":
493
        description: Bad request
494
        schema:
495
          $ref: "../swagger.yaml#/definitions/error"
479
      "401":
496
      "401":
480
        description: Authentication required
497
        description: Authentication required
481
        schema:
498
        schema:
Lines 527-533 Link Here
527
          items:
544
          items:
528
            $ref: "../swagger.yaml#/definitions/patron"
545
            $ref: "../swagger.yaml#/definitions/patron"
529
      "400":
546
      "400":
530
        description: Bad parameter
547
        description: |
548
          Bad request. Possible `error_code` attribute values:
549
550
            * `invalid_attribute_type`
551
            * `attribute_not_unique`
552
            * `non_repeatable_attribute`
553
            * `missing_mandatory_attribute`
531
        schema:
554
        schema:
532
          $ref: "../swagger.yaml#/definitions/error"
555
          $ref: "../swagger.yaml#/definitions/error"
533
      "403":
556
      "403":
Lines 570-576 Link Here
570
      "204":
593
      "204":
571
        description: Patron deleted
594
        description: Patron deleted
572
      "400":
595
      "400":
573
        description: Patron deletion failed
596
        description: Bad request
574
        schema:
597
        schema:
575
          $ref: "../swagger.yaml#/definitions/error"
598
          $ref: "../swagger.yaml#/definitions/error"
576
      "401":
599
      "401":
(-)a/api/v1/swagger/paths/patrons_account.yaml (+8 lines)
Lines 15-20 Link Here
15
        description: Patron's account balance
15
        description: Patron's account balance
16
        schema:
16
        schema:
17
          $ref: "../swagger.yaml#/definitions/patron_balance"
17
          $ref: "../swagger.yaml#/definitions/patron_balance"
18
      "400":
19
        description: Bad request
20
        schema:
21
          $ref: "../swagger.yaml#/definitions/error"
18
      "401":
22
      "401":
19
        description: Authentication required
23
        description: Authentication required
20
        schema:
24
        schema:
Lines 64-69 Link Here
64
        description: Credit added
68
        description: Credit added
65
        schema:
69
        schema:
66
          $ref: "../swagger.yaml#/definitions/account_line"
70
          $ref: "../swagger.yaml#/definitions/account_line"
71
      "400":
72
        description: Bad request
73
        schema:
74
          $ref: "../swagger.yaml#/definitions/error"
67
      "401":
75
      "401":
68
        description: Authentication required
76
        description: Authentication required
69
        schema:
77
        schema:
(-)a/api/v1/swagger/paths/patrons_extended_attributes.yaml (-3 / +14 lines)
Lines 25-30 Link Here
25
          type: array
25
          type: array
26
          items:
26
          items:
27
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
27
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
28
      "400":
29
        description: |
30
          Bad request. Possible `error_code` attribute values:
31
32
            * `invalid_query`
33
        schema:
34
          $ref: "../swagger.yaml#/definitions/error"
28
      "401":
35
      "401":
29
        description: Authentication required
36
        description: Authentication required
30
        schema:
37
        schema:
Lines 73-79 Link Here
73
        schema:
80
        schema:
74
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
81
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
75
      "400":
82
      "400":
76
        description: Bad parameter
83
        description: Bad request
77
        schema:
84
        schema:
78
          $ref: "../swagger.yaml#/definitions/error"
85
          $ref: "../swagger.yaml#/definitions/error"
79
      "401":
86
      "401":
Lines 132-138 Link Here
132
          items:
139
          items:
133
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
140
            $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
134
      "400":
141
      "400":
135
        description: Bad parameters
142
        description: Bad request
136
        schema:
143
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
144
          $ref: "../swagger.yaml#/definitions/error"
138
      "401":
145
      "401":
Lines 199-205 Link Here
199
        schema:
206
        schema:
200
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
207
          $ref: "../swagger.yaml#/definitions/patron_extended_attribute"
201
      "400":
208
      "400":
202
        description: Bad parameter
209
        description: Bad request
203
        schema:
210
        schema:
204
          $ref: "../swagger.yaml#/definitions/error"
211
          $ref: "../swagger.yaml#/definitions/error"
205
      "401":
212
      "401":
Lines 250-255 Link Here
250
    responses:
257
    responses:
251
      "204":
258
      "204":
252
        description: Extended patron attribute deleted
259
        description: Extended patron attribute deleted
260
      "400":
261
        description: Bad request
262
        schema:
263
          $ref: "../swagger.yaml#/definitions/error"
253
      "401":
264
      "401":
254
        description: Authentication required
265
        description: Authentication required
255
        schema:
266
        schema:
(-)a/api/v1/swagger/paths/patrons_holds.yaml (+7 lines)
Lines 35-40 Link Here
35
          type: array
35
          type: array
36
          items:
36
          items:
37
            $ref: "../swagger.yaml#/definitions/hold"
37
            $ref: "../swagger.yaml#/definitions/hold"
38
      "400":
39
        description: |
40
          Bad request. Possible `error_code` attribute values:
41
42
            * `invalid_query`
43
        schema:
44
          $ref: "../swagger.yaml#/definitions/error"
38
      "401":
45
      "401":
39
        description: Authentication required
46
        description: Authentication required
40
        schema:
47
        schema:
(-)a/api/v1/swagger/paths/public_oauth.yaml (-2 / +5 lines)
Lines 63-71 Link Here
63
        schema:
63
        schema:
64
          type: string
64
          type: string
65
      "400":
65
      "400":
66
        description: Bad Request
66
        description: |
67
          Bad request. Possible `error_code` attribute values:
68
69
            * `invalid_query`
67
        schema:
70
        schema:
68
          $ref: ../swagger.yaml#/definitions/error
71
          $ref: "../swagger.yaml#/definitions/error"
69
      "403":
72
      "403":
70
        description: Access forbidden
73
        description: Access forbidden
71
        schema:
74
        schema:
(-)a/api/v1/swagger/paths/quotes.yaml (+23 lines)
Lines 44-49 Link Here
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/quote"
46
            $ref: "../swagger.yaml#/definitions/quote"
47
      "400":
48
        description: |
49
          Bad request. Possible `error_code` attribute values:
50
51
            * `invalid_query`
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
47
      "403":
54
      "403":
48
        description: Access forbidden
55
        description: Access forbidden
49
        schema:
56
        schema:
Lines 82-87 Link Here
82
        description: Quote added
89
        description: Quote added
83
        schema:
90
        schema:
84
          $ref: "../swagger.yaml#/definitions/quote"
91
          $ref: "../swagger.yaml#/definitions/quote"
92
      "400":
93
        description: Bad request
94
        schema:
95
          $ref: "../swagger.yaml#/definitions/error"
85
      "401":
96
      "401":
86
        description: Authentication required
97
        description: Authentication required
87
        schema:
98
        schema:
Lines 120-125 Link Here
120
        description: A Quote
131
        description: A Quote
121
        schema:
132
        schema:
122
          $ref: "../swagger.yaml#/definitions/quote"
133
          $ref: "../swagger.yaml#/definitions/quote"
134
      "400":
135
        description: Bad request
136
        schema:
137
          $ref: "../swagger.yaml#/definitions/error"
123
      "404":
138
      "404":
124
        description: Quote not found
139
        description: Quote not found
125
        schema:
140
        schema:
Lines 159-164 Link Here
159
        description: A quote
174
        description: A quote
160
        schema:
175
        schema:
161
          $ref: "../swagger.yaml#/definitions/quote"
176
          $ref: "../swagger.yaml#/definitions/quote"
177
      "400":
178
        description: Bad request
179
        schema:
180
          $ref: "../swagger.yaml#/definitions/error"
162
      "401":
181
      "401":
163
        description: Authentication required
182
        description: Authentication required
164
        schema:
183
        schema:
Lines 198-203 Link Here
198
    responses:
217
    responses:
199
      "204":
218
      "204":
200
        description: Quote deleted
219
        description: Quote deleted
220
      "400":
221
        description: Bad request
222
        schema:
223
          $ref: "../swagger.yaml#/definitions/error"
201
      "401":
224
      "401":
202
        description: Authentication required
225
        description: Authentication required
203
        schema:
226
        schema:
(-)a/api/v1/swagger/paths/rotas.yaml (-1 / +4 lines)
Lines 29-35 Link Here
29
      "200":
29
      "200":
30
        description: OK
30
        description: OK
31
      "400":
31
      "400":
32
        description: Bad request
32
        description: |
33
          Bad request. Possible `error_code` attribute values:
34
35
            * `invalid_query`
33
        schema:
36
        schema:
34
          $ref: "../swagger.yaml#/definitions/error"
37
          $ref: "../swagger.yaml#/definitions/error"
35
      "401":
38
      "401":
(-)a/api/v1/swagger/paths/search_filters.yaml (+23 lines)
Lines 24-29 Link Here
24
          type: array
24
          type: array
25
          items:
25
          items:
26
            $ref: "../swagger.yaml#/definitions/search_filter"
26
            $ref: "../swagger.yaml#/definitions/search_filter"
27
      "400":
28
        description: |
29
          Bad request. Possible `error_code` attribute values:
30
31
            * `invalid_query`
32
        schema:
33
          $ref: "../swagger.yaml#/definitions/error"
27
      '403':
34
      '403':
28
        description: Access forbidden
35
        description: Access forbidden
29
        schema:
36
        schema:
Lines 59-64 Link Here
59
        description: Search filter added
66
        description: Search filter added
60
        schema:
67
        schema:
61
          $ref: "../swagger.yaml#/definitions/search_filter"
68
          $ref: "../swagger.yaml#/definitions/search_filter"
69
      "400":
70
        description: Bad request
71
        schema:
72
          $ref: "../swagger.yaml#/definitions/error"
62
      '401':
73
      '401':
63
        description: Authentication required
74
        description: Authentication required
64
        schema:
75
        schema:
Lines 98-103 Link Here
98
        description: A search filter
109
        description: A search filter
99
        schema:
110
        schema:
100
          $ref: "../swagger.yaml#/definitions/search_filter"
111
          $ref: "../swagger.yaml#/definitions/search_filter"
112
      "400":
113
        description: Bad request
114
        schema:
115
          $ref: "../swagger.yaml#/definitions/error"
101
      '403':
116
      '403':
102
        description: Access forbidden
117
        description: Access forbidden
103
        schema:
118
        schema:
Lines 138-143 Link Here
138
        description: An search_filter
153
        description: An search_filter
139
        schema:
154
        schema:
140
          $ref: "../swagger.yaml#/definitions/search_filter"
155
          $ref: "../swagger.yaml#/definitions/search_filter"
156
      "400":
157
        description: Bad request
158
        schema:
159
          $ref: "../swagger.yaml#/definitions/error"
141
      '401':
160
      '401':
142
        description: Authentication required
161
        description: Authentication required
143
        schema:
162
        schema:
Lines 176-181 Link Here
176
        description: Searc filter deleted
195
        description: Searc filter deleted
177
        schema:
196
        schema:
178
          type: string
197
          type: string
198
      "400":
199
        description: Bad request
200
        schema:
201
          $ref: "../swagger.yaml#/definitions/error"
179
      '401':
202
      '401':
180
        description: Authentication required
203
        description: Authentication required
181
        schema:
204
        schema:
(-)a/api/v1/swagger/paths/suggestions.yaml (+22 lines)
Lines 25-30 Link Here
25
          type: array
25
          type: array
26
          items:
26
          items:
27
            $ref: "../swagger.yaml#/definitions/suggestion"
27
            $ref: "../swagger.yaml#/definitions/suggestion"
28
      "400":
29
        description: |
30
          Bad request. Possible `error_code` attribute values:
31
32
            * `invalid_query`
33
        schema:
34
          $ref: "../swagger.yaml#/definitions/error"
28
      "403":
35
      "403":
29
        description: Access forbidden
36
        description: Access forbidden
30
        schema:
37
        schema:
Lines 119-124 Link Here
119
        description: A suggestion
126
        description: A suggestion
120
        schema:
127
        schema:
121
          $ref: "../swagger.yaml#/definitions/suggestion"
128
          $ref: "../swagger.yaml#/definitions/suggestion"
129
      "400":
130
        description: Bad request
131
        schema:
132
          $ref: "../swagger.yaml#/definitions/error"
122
      "403":
133
      "403":
123
        description: Access forbidden
134
        description: Access forbidden
124
        schema:
135
        schema:
Lines 205-210 Link Here
205
        description: Suggestion deleted
216
        description: Suggestion deleted
206
        schema:
217
        schema:
207
          type: string
218
          type: string
219
      "400":
220
        description: Bad request
221
        schema:
222
          $ref: "../swagger.yaml#/definitions/error"
208
      "401":
223
      "401":
209
        description: Authentication required
224
        description: Authentication required
210
        schema:
225
        schema:
Lines 266-271 Link Here
266
          type: array
281
          type: array
267
          items:
282
          items:
268
            $ref: "../swagger.yaml#/definitions/patron"
283
            $ref: "../swagger.yaml#/definitions/patron"
284
      "400":
285
        description: |
286
          Bad request. Possible `error_code` attribute values:
287
288
            * `invalid_query`
289
        schema:
290
          $ref: "../swagger.yaml#/definitions/error"
269
      "403":
291
      "403":
270
        description: Access forbidden
292
        description: Access forbidden
271
        schema:
293
        schema:
(-)a/api/v1/swagger/paths/transfer_limits.yaml (+27 lines)
Lines 44-49 Link Here
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/transfer_limit"
46
            $ref: "../swagger.yaml#/definitions/transfer_limit"
47
      "400":
48
        description: |
49
          Bad request. Possible `error_code` attribute values:
50
51
            * `invalid_query`
52
        schema:
53
          $ref: "../swagger.yaml#/definitions/error"
54
      "401":
55
        description: Authentication required
56
        schema:
57
          $ref: "../swagger.yaml#/definitions/error"
58
      "403":
59
        description: Access forbidden
60
        schema:
61
          $ref: "../swagger.yaml#/definitions/error"
47
      "500":
62
      "500":
48
        description: |
63
        description: |
49
          Internal server error. Possible `error_code` attribute values:
64
          Internal server error. Possible `error_code` attribute values:
Lines 127-132 Link Here
127
        description: Transfer limit deleted
142
        description: Transfer limit deleted
128
        schema:
143
        schema:
129
          type: string
144
          type: string
145
      "400":
146
        description: Bad request
147
        schema:
148
          $ref: "../swagger.yaml#/definitions/error"
130
      "401":
149
      "401":
131
        description: Authentication required
150
        description: Authentication required
132
        schema:
151
        schema:
Lines 232-237 Link Here
232
          type: array
251
          type: array
233
          items:
252
          items:
234
            $ref: "../swagger.yaml#/definitions/transfer_limit"
253
            $ref: "../swagger.yaml#/definitions/transfer_limit"
254
      "400":
255
        description: Bad request
256
        schema:
257
          $ref: "../swagger.yaml#/definitions/error"
235
      "500":
258
      "500":
236
        description: |
259
        description: |
237
          Internal server error. Possible `error_code` attribute values:
260
          Internal server error. Possible `error_code` attribute values:
Lines 288-293 Link Here
288
        description: Transfer limits deleted
311
        description: Transfer limits deleted
289
        schema:
312
        schema:
290
          type: string
313
          type: string
314
      "400":
315
        description: Bad request
316
        schema:
317
          $ref: "../swagger.yaml#/definitions/error"
291
      "401":
318
      "401":
292
        description: Authentication required
319
        description: Authentication required
293
        schema:
320
        schema:
(-)a/t/db_dependent/api/v1/query.t (-1 / +1 lines)
Lines 171-177 subtest 'SQL injection in "query" handling' => sub { Link Here
171
        "[{\"-and\":[[{\"me.patron_id\":{\"like(IF(ASCII(SUBSTRING((SELECT version()),1,1))=ASCII('1'),SLEEP(1/100000),0))or\":\"\%a\%\"}}]]}]";
171
        "[{\"-and\":[[{\"me.patron_id\":{\"like(IF(ASCII(SUBSTRING((SELECT version()),1,1))=ASCII('1'),SLEEP(1/100000),0))or\":\"\%a\%\"}}]]}]";
172
172
173
    $t->get_ok("//$userid:$password@/api/v1/patrons?q=$q")
173
    $t->get_ok("//$userid:$password@/api/v1/patrons?q=$q")
174
        ->status_is( 500, 'Attempt to inject SQL through operators is rejected' );
174
        ->status_is( 400, 'Attempt to inject SQL through operators is rejected' );
175
175
176
    $schema->storage->txn_rollback;
176
    $schema->storage->txn_rollback;
177
};
177
};
(-)a/xt/api.t (-2 / +45 lines)
Lines 14-23 Link Here
14
14
15
use Modern::Perl;
15
use Modern::Perl;
16
16
17
use Test::More tests => 3;
17
use Test::More tests => 4;
18
18
19
use Test::Mojo;
19
use Test::Mojo;
20
use Data::Dumper;
20
use Data::Dumper;
21
use List::MoreUtils qw(any);
21
22
22
use FindBin();
23
use FindBin();
23
use IPC::Cmd qw(can_run);
24
use IPC::Cmd qw(can_run);
Lines 93-95 subtest 'The spec passes the swagger-cli validation' => sub { Link Here
93
          or diag $var;
94
          or diag $var;
94
    }
95
    }
95
};
96
};
96
- 
97
98
subtest '400 response tests' => sub {
99
100
    plan tests => 1;
101
102
    my @errors;
103
104
    foreach my $route ( sort keys %{$paths} ) {
105
        foreach my $verb ( keys %{ $paths->{$route} } ) {
106
107
            my $response_400 = $paths->{$route}->{$verb}->{responses}->{400};
108
109
            if ( !$response_400 ) {
110
                push @errors, "$verb $route -> response 400 absent";
111
                next;
112
            }
113
114
            push @errors,
115
                "$verb $route -> 'description' does not start with 'Bad request': ($response_400->{description})"
116
                unless $response_400->{description} =~ /^Bad request/;
117
118
            my $ref = $response_400->{schema}->{'$ref'};
119
            push @errors, "$verb $route -> '\$ref' is not '#/definitions/error': ($ref)"
120
                unless $ref =~ m/^#\/definitions\/error/;
121
122
            # GET routes with q parameter must mention the `invalid_query` error code
123
            if (   ( any { $_->{in} eq 'body' && $_->{name} eq 'query' } @{ $paths->{$route}->{$verb}->{parameters} } )
124
                || ( any { $_->{in} eq 'query' && $_->{name} eq 'q' } @{ $paths->{$route}->{$verb}->{parameters} } ) )
125
            {
126
127
                push @errors,
128
                    "$verb $route -> 'description' does not include '* \`invalid_query\`': ($response_400->{description})"
129
                    unless $response_400->{description} =~ /\* \`invalid_query\`/;
130
            }
131
        }
132
    }
133
134
    is( scalar @errors, 0, 'No errors in 400 definitions in the spec' );
135
136
    foreach my $error (@errors) {
137
        print STDERR "$error\n";
138
    }
139
};

Return to bug 37018