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 75-80 Link Here
75
          type: array
75
          type: array
76
          items:
76
          items:
77
            $ref: "../swagger.yaml#/definitions/order"
77
            $ref: "../swagger.yaml#/definitions/order"
78
      "400":
79
        description: |
80
          Bad request. Possible `error_code` attribute values:
81
82
            * `invalid_query`
83
        schema:
84
          $ref: "../swagger.yaml#/definitions/error"
78
      "401":
85
      "401":
79
        description: Authentication required
86
        description: Authentication required
80
        schema:
87
        schema:
Lines 192-197 Link Here
192
        description: An order
199
        description: An order
193
        schema:
200
        schema:
194
          $ref: "../swagger.yaml#/definitions/order"
201
          $ref: "../swagger.yaml#/definitions/order"
202
      "400":
203
        description: Bad request
204
        schema:
205
          $ref: "../swagger.yaml#/definitions/error"
195
      "401":
206
      "401":
196
        description: Authentication required
207
        description: Authentication required
197
        schema:
208
        schema:
Lines 239-244 Link Here
239
        description: An order
250
        description: An order
240
        schema:
251
        schema:
241
          $ref: "../swagger.yaml#/definitions/order"
252
          $ref: "../swagger.yaml#/definitions/order"
253
      "400":
254
        description: Bad request
255
        schema:
256
          $ref: "../swagger.yaml#/definitions/error"
242
      "401":
257
      "401":
243
        description: Authentication required
258
        description: Authentication required
244
        schema:
259
        schema:
Lines 278-283 Link Here
278
    responses:
293
    responses:
279
      "204":
294
      "204":
280
        description: Order deleted
295
        description: Order deleted
296
      "400":
297
        description: Bad request
298
        schema:
299
          $ref: "../swagger.yaml#/definitions/error"
281
      "401":
300
      "401":
282
        description: Authentication required
301
        description: Authentication required
283
        schema:
302
        schema:
(-)a/api/v1/swagger/paths/acquisitions_vendors.yaml (+23 lines)
Lines 44-49 Link Here
44
          type: array
44
          type: array
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/vendor"
46
            $ref: "../swagger.yaml#/definitions/vendor"
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
      "401":
54
      "401":
48
        description: Authentication required
55
        description: Authentication required
49
        schema:
56
        schema:
Lines 90-95 Link Here
90
        description: Vendor added
97
        description: Vendor added
91
        schema:
98
        schema:
92
          $ref: "../swagger.yaml#/definitions/vendor"
99
          $ref: "../swagger.yaml#/definitions/vendor"
100
      "400":
101
        description: Bad request
102
        schema:
103
          $ref: "../swagger.yaml#/definitions/error"
93
      "401":
104
      "401":
94
        description: Authentication required
105
        description: Authentication required
95
        schema:
106
        schema:
Lines 132-137 Link Here
132
        description: A vendor
143
        description: A vendor
133
        schema:
144
        schema:
134
          $ref: "../swagger.yaml#/definitions/vendor"
145
          $ref: "../swagger.yaml#/definitions/vendor"
146
      "400":
147
        description: Bad request
148
        schema:
149
          $ref: "../swagger.yaml#/definitions/error"
135
      "401":
150
      "401":
136
        description: Authentication required
151
        description: Authentication required
137
        schema:
152
        schema:
Lines 179-184 Link Here
179
        description: A vendor
194
        description: A vendor
180
        schema:
195
        schema:
181
          $ref: "../swagger.yaml#/definitions/vendor"
196
          $ref: "../swagger.yaml#/definitions/vendor"
197
      "400":
198
        description: Bad request
199
        schema:
200
          $ref: "../swagger.yaml#/definitions/error"
182
      "401":
201
      "401":
183
        description: Authentication required
202
        description: Authentication required
184
        schema:
203
        schema:
Lines 218-223 Link Here
218
    responses:
237
    responses:
219
      "204":
238
      "204":
220
        description: Vendor deleted
239
        description: Vendor deleted
240
      "400":
241
        description: Bad request
242
        schema:
243
          $ref: "../swagger.yaml#/definitions/error"
221
      "401":
244
      "401":
222
        description: Authentication required
245
        description: Authentication required
223
        schema:
246
        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/authorities.yaml (-1 / +16 lines)
Lines 24-29 Link Here
24
    responses:
24
    responses:
25
      "200":
25
      "200":
26
        description: A list of authorities
26
        description: A list of authorities
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
      "401":
34
      "401":
28
        description: Authentication required
35
        description: Authentication required
29
        schema:
36
        schema:
Lines 92-98 Link Here
92
      "201":
99
      "201":
93
        description: An authority
100
        description: An authority
94
      "400":
101
      "400":
95
        description: Bad request.
102
        description: Bad request
96
        schema:
103
        schema:
97
          $ref: "../swagger.yaml#/definitions/error"
104
          $ref: "../swagger.yaml#/definitions/error"
98
      "401":
105
      "401":
Lines 149-154 Link Here
149
    responses:
156
    responses:
150
      "200":
157
      "200":
151
        description: An authority
158
        description: An authority
159
      "400":
160
        description: Bad request
161
        schema:
162
          $ref: "../swagger.yaml#/definitions/error"
152
      "401":
163
      "401":
153
        description: Authentication required
164
        description: Authentication required
154
        schema:
165
        schema:
Lines 197-202 Link Here
197
        description: Authority deleted
208
        description: Authority deleted
198
        schema:
209
        schema:
199
          type: string
210
          type: string
211
      "400":
212
        description: Bad request
213
        schema:
214
          $ref: "../swagger.yaml#/definitions/error"
200
      "401":
215
      "401":
201
        description: Authentication required
216
        description: Authentication required
202
        schema:
217
        schema:
(-)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 555-561 Link Here
555
          items:
584
          items:
556
            $ref: "../swagger.yaml#/definitions/library"
585
            $ref: "../swagger.yaml#/definitions/library"
557
      "400":
586
      "400":
558
        description: Missing or wrong parameters
587
        description: |
588
          Bad request. Possible `error_code` attribute values:
589
590
            * `invalid_query`
559
        schema:
591
        schema:
560
          $ref: "../swagger.yaml#/definitions/error"
592
          $ref: "../swagger.yaml#/definitions/error"
561
      "401":
593
      "401":
Lines 601-606 Link Here
601
    responses:
633
    responses:
602
      "200":
634
      "200":
603
        description: A biblio
635
        description: A biblio
636
      "400":
637
        description: Bad request
638
        schema:
639
          $ref: "../swagger.yaml#/definitions/error"
604
      "401":
640
      "401":
605
        description: Authentication required
641
        description: Authentication required
606
        schema:
642
        schema:
Lines 668-673 Link Here
668
          type: array
704
          type: array
669
          items:
705
          items:
670
            $ref: "../swagger.yaml#/definitions/item"
706
            $ref: "../swagger.yaml#/definitions/item"
707
      "400":
708
        description: |
709
          Bad request. Possible `error_code` attribute values:
710
711
            * `invalid_query`
712
        schema:
713
          $ref: "../swagger.yaml#/definitions/error"
671
      "401":
714
      "401":
672
        description: Authentication required
715
        description: Authentication required
673
        schema:
716
        schema:
Lines 741-746 Link Here
741
              description: number of ratings
784
              description: number of ratings
742
              type: integer
785
              type: integer
743
          additionalProperties: false
786
          additionalProperties: false
787
      "400":
788
        description: Bad request
789
        schema:
790
          $ref: "../swagger.yaml#/definitions/error"
744
      "401":
791
      "401":
745
        description: Authentication required
792
        description: Authentication required
746
        schema:
793
        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/item_types.yaml (-2 / +5 lines)
Lines 32-39 Link Here
32
          items:
32
          items:
33
            $ref: "../swagger.yaml#/definitions/item_type"
33
            $ref: "../swagger.yaml#/definitions/item_type"
34
          type: array
34
          type: array
35
      400:
35
      "400":
36
        description: Bad request
36
        description: |
37
          Bad request. Possible `error_code` attribute values:
38
39
            * `invalid_query`
37
        schema:
40
        schema:
38
          $ref: "../swagger.yaml#/definitions/error"
41
          $ref: "../swagger.yaml#/definitions/error"
39
      403:
42
      403:
(-)a/api/v1/swagger/paths/items.yaml (-5 / +29 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 130-136 Link Here
130
      "204":
137
      "204":
131
        description: Deleted item
138
        description: Deleted item
132
      "400":
139
      "400":
133
        description: Missing or wrong parameters
140
        description: Bad request
134
        schema:
141
        schema:
135
          $ref: "../swagger.yaml#/definitions/error"
142
          $ref: "../swagger.yaml#/definitions/error"
136
      "403":
143
      "403":
Lines 192-198 Link Here
192
          items:
199
          items:
193
            $ref: "../swagger.yaml#/definitions/item"
200
            $ref: "../swagger.yaml#/definitions/item"
194
      "400":
201
      "400":
195
        description: Bad parameter
202
        description: Bad request
196
        schema:
203
        schema:
197
          $ref: "../swagger.yaml#/definitions/error"
204
          $ref: "../swagger.yaml#/definitions/error"
198
      "401":
205
      "401":
Lines 267-272 Link Here
267
          type: array
274
          type: array
268
          items:
275
          items:
269
            $ref: "../swagger.yaml#/definitions/item"
276
            $ref: "../swagger.yaml#/definitions/item"
277
      "400":
278
        description: |
279
          Bad request. Possible `error_code` attribute values:
280
281
            * `invalid_query`
282
        schema:
283
          $ref: "../swagger.yaml#/definitions/error"
270
      "401":
284
      "401":
271
        description: Authentication required
285
        description: Authentication required
272
        schema:
286
        schema:
Lines 308-314 Link Here
308
      "204":
322
      "204":
309
        description: Bundle link deleted
323
        description: Bundle link deleted
310
      "400":
324
      "400":
311
        description: Bad parameter
325
        description: Bad request
312
        schema:
326
        schema:
313
          $ref: "../swagger.yaml#/definitions/error"
327
          $ref: "../swagger.yaml#/definitions/error"
314
      "409":
328
      "409":
Lines 372-378 Link Here
372
          items:
386
          items:
373
            $ref: "../swagger.yaml#/definitions/library"
387
            $ref: "../swagger.yaml#/definitions/library"
374
      "400":
388
      "400":
375
        description: Missing or wrong parameters
389
        description: |
390
          Bad request. Possible `error_code` attribute values:
391
392
            * `invalid_query`
376
        schema:
393
        schema:
377
          $ref: "../swagger.yaml#/definitions/error"
394
          $ref: "../swagger.yaml#/definitions/error"
378
      "401":
395
      "401":
Lines 443-448 Link Here
443
          type: array
460
          type: array
444
          items:
461
          items:
445
            $ref: "../swagger.yaml#/definitions/item"
462
            $ref: "../swagger.yaml#/definitions/item"
463
      "400":
464
        description: |
465
          Bad request. Possible `error_code` attribute values:
466
467
            * `invalid_query`
468
        schema:
469
          $ref: "../swagger.yaml#/definitions/error"
446
      "401":
470
      "401":
447
        description: Authentication required
471
        description: Authentication required
448
        schema:
472
        schema:
(-)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 (-1 / +23 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 67-72 Link Here
67
          type: array
71
          type: array
68
          items:
72
          items:
69
            $ref: "../swagger.yaml#/definitions/credit"
73
            $ref: "../swagger.yaml#/definitions/credit"
74
      "400":
75
        description: |
76
          Bad request. Possible `error_code` attribute values:
77
78
            * `invalid_query`
79
        schema:
80
          $ref: "../swagger.yaml#/definitions/error"
70
      "403":
81
      "403":
71
        description: Access forbidden
82
        description: Access forbidden
72
        schema:
83
        schema:
Lines 104-109 Link Here
104
        description: Credit added
115
        description: Credit added
105
        schema:
116
        schema:
106
          $ref: "../swagger.yaml#/definitions/account_line"
117
          $ref: "../swagger.yaml#/definitions/account_line"
118
      "400":
119
        description: Bad request
120
        schema:
121
          $ref: "../swagger.yaml#/definitions/error"
107
      "401":
122
      "401":
108
        description: Authentication required
123
        description: Authentication required
109
        schema:
124
        schema:
Lines 155-160 Link Here
155
          type: array
170
          type: array
156
          items:
171
          items:
157
            $ref: "../swagger.yaml#/definitions/debit"
172
            $ref: "../swagger.yaml#/definitions/debit"
173
      "400":
174
        description: |
175
          Bad request. Possible `error_code` attribute values:
176
177
            * `invalid_query`
178
        schema:
179
          $ref: "../swagger.yaml#/definitions/error"
158
      "403":
180
      "403":
159
        description: Access forbidden
181
        description: Access forbidden
160
        schema:
182
        schema:
Lines 197-203 Link Here
197
        schema:
219
        schema:
198
          $ref: "../swagger.yaml#/definitions/debit"
220
          $ref: "../swagger.yaml#/definitions/debit"
199
      "400":
221
      "400":
200
        description: Bad parameter
222
        description: Bad request
201
        schema:
223
        schema:
202
          $ref: "../swagger.yaml#/definitions/error"
224
          $ref: "../swagger.yaml#/definitions/error"
203
      "401":
225
      "401":
(-)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/tickets.yaml (+41 lines)
Lines 37-42 Link Here
37
          type: array
37
          type: array
38
          items:
38
          items:
39
            $ref: "../swagger.yaml#/definitions/ticket"
39
            $ref: "../swagger.yaml#/definitions/ticket"
40
      "400":
41
        description: |
42
          Bad request. Possible `error_code` attribute values:
43
44
            * `invalid_query`
45
        schema:
46
          $ref: "../swagger.yaml#/definitions/error"
40
      "403":
47
      "403":
41
        description: Access forbidden
48
        description: Access forbidden
42
        schema:
49
        schema:
Lines 75-80 Link Here
75
        description: Ticket added
82
        description: Ticket added
76
        schema:
83
        schema:
77
          $ref: "../swagger.yaml#/definitions/ticket"
84
          $ref: "../swagger.yaml#/definitions/ticket"
85
      "400":
86
        description: Bad request
87
        schema:
88
          $ref: "../swagger.yaml#/definitions/error"
78
      "401":
89
      "401":
79
        description: Authentication required
90
        description: Authentication required
80
        schema:
91
        schema:
Lines 113-118 Link Here
113
        description: A ticket
124
        description: A ticket
114
        schema:
125
        schema:
115
          $ref: "../swagger.yaml#/definitions/ticket"
126
          $ref: "../swagger.yaml#/definitions/ticket"
127
      "400":
128
        description: |
129
          Bad request. Possible `error_code` attribute values:
130
131
            * `invalid_query`
132
        schema:
133
          $ref: "../swagger.yaml#/definitions/error"
116
      "404":
134
      "404":
117
        description: Ticket not found
135
        description: Ticket not found
118
        schema:
136
        schema:
Lines 152-157 Link Here
152
        description: A ticket
170
        description: A ticket
153
        schema:
171
        schema:
154
          $ref: "../swagger.yaml#/definitions/ticket"
172
          $ref: "../swagger.yaml#/definitions/ticket"
173
      "400":
174
        description: Bad request
175
        schema:
176
          $ref: "../swagger.yaml#/definitions/error"
155
      "401":
177
      "401":
156
        description: Authentication required
178
        description: Authentication required
157
        schema:
179
        schema:
Lines 188-193 Link Here
188
    responses:
210
    responses:
189
      "204":
211
      "204":
190
        description: Ticket deleted
212
        description: Ticket deleted
213
      "400":
214
        description: Bad request
215
        schema:
216
          $ref: "../swagger.yaml#/definitions/error"
191
      "401":
217
      "401":
192
        description: Authentication required
218
        description: Authentication required
193
        schema:
219
        schema:
Lines 247-252 Link Here
247
          type: array
273
          type: array
248
          items:
274
          items:
249
            $ref: "../swagger.yaml#/definitions/ticket_update"
275
            $ref: "../swagger.yaml#/definitions/ticket_update"
276
      "400":
277
        description: |
278
          Bad request. Possible `error_code` attribute values:
279
280
            * `invalid_query`
281
        schema:
282
          $ref: "../swagger.yaml#/definitions/error"
250
      "403":
283
      "403":
251
        description: Access forbidden
284
        description: Access forbidden
252
        schema:
285
        schema:
Lines 290-295 Link Here
290
        description: Ticket added
323
        description: Ticket added
291
        schema:
324
        schema:
292
          $ref: "../swagger.yaml#/definitions/ticket_update"
325
          $ref: "../swagger.yaml#/definitions/ticket_update"
326
      "400":
327
        description: Bad request
328
        schema:
329
          $ref: "../swagger.yaml#/definitions/error"
293
      "401":
330
      "401":
294
        description: Authentication required
331
        description: Authentication required
295
        schema:
332
        schema:
Lines 334-339 Link Here
334
        description: Ticket added
371
        description: Ticket added
335
        schema:
372
        schema:
336
          $ref: "../swagger.yaml#/definitions/ticket"
373
          $ref: "../swagger.yaml#/definitions/ticket"
374
      "400":
375
        description: Bad request
376
        schema:
377
          $ref: "../swagger.yaml#/definitions/error"
337
      "401":
378
      "401":
338
        description: Authentication required
379
        description: Authentication required
339
        schema:
380
        schema:
(-)a/api/v1/swagger/paths/transfer_limits.yaml (-1 / +12 lines)
Lines 45-51 Link Here
45
          items:
45
          items:
46
            $ref: "../swagger.yaml#/definitions/transfer_limit"
46
            $ref: "../swagger.yaml#/definitions/transfer_limit"
47
      "400":
47
      "400":
48
        description: Bad request
48
        description: |
49
          Bad request. Possible `error_code` attribute values:
50
51
            * `invalid_query`
49
        schema:
52
        schema:
50
          $ref: "../swagger.yaml#/definitions/error"
53
          $ref: "../swagger.yaml#/definitions/error"
51
      "401":
54
      "401":
Lines 139-144 Link Here
139
        description: Transfer limit deleted
142
        description: Transfer limit deleted
140
        schema:
143
        schema:
141
          type: string
144
          type: string
145
      "400":
146
        description: Bad request
147
        schema:
148
          $ref: "../swagger.yaml#/definitions/error"
142
      "401":
149
      "401":
143
        description: Authentication required
150
        description: Authentication required
144
        schema:
151
        schema:
Lines 314-319 Link Here
314
    responses:
321
    responses:
315
      "204":
322
      "204":
316
        description: Transfer limits deleted
323
        description: Transfer limits deleted
324
      "400":
325
        description: Bad request
326
        schema:
327
          $ref: "../swagger.yaml#/definitions/error"
317
      "401":
328
      "401":
318
        description: Authentication required
329
        description: Authentication required
319
        schema:
330
        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