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

(-)a/Koha/REST/V1/Patrons.pm (-4 / +4 lines)
Lines 212-218 sub add { Link Here
212
            {
212
            {
213
                return $c->render(
213
                return $c->render(
214
                    status  => 400,
214
                    status  => 400,
215
                    openapi => { error => "$_" }
215
                    openapi => { error => "$_", error_code => 'missing_mandatory_attribute' }
216
                );
216
                );
217
            }
217
            }
218
            elsif (
218
            elsif (
Lines 221-227 sub add { Link Here
221
            {
221
            {
222
                return $c->render(
222
                return $c->render(
223
                    status  => 400,
223
                    status  => 400,
224
                    openapi => { error => "$_" }
224
                    openapi => { error => "$_", error_code => 'invalid_attribute_type' }
225
                );
225
                );
226
            }
226
            }
227
            elsif (
227
            elsif (
Lines 230-236 sub add { Link Here
230
            {
230
            {
231
                return $c->render(
231
                return $c->render(
232
                    status  => 400,
232
                    status  => 400,
233
                    openapi => { error => "$_" }
233
                    openapi => { error => "$_", error_code => 'non_repeatable_attribute' }
234
                );
234
                );
235
            }
235
            }
236
            elsif (
236
            elsif (
Lines 239-245 sub add { Link Here
239
            {
239
            {
240
                return $c->render(
240
                return $c->render(
241
                    status  => 400,
241
                    status  => 400,
242
                    openapi => { error => "$_" }
242
                    openapi => { error => "$_", error_code => 'attribute_not_unique' }
243
                );
243
                );
244
            }
244
            }
245
        }
245
        }
(-)a/api/v1/swagger/paths/patrons.yaml (-2 / +7 lines)
Lines 434-440 Link Here
434
          items:
434
          items:
435
            $ref: "../swagger.yaml#/definitions/patron"
435
            $ref: "../swagger.yaml#/definitions/patron"
436
      "400":
436
      "400":
437
        description: Bad parameter
437
        description: |
438
          Bad parameter. Possible `error_code` attribute values:
439
440
            * `invalid_attribute_type`
441
            * `attribute_not_unique`
442
            * `non_repeatable_attribute`
443
            * `missing_mandatory_attribute`
438
        schema:
444
        schema:
439
          $ref: "../swagger.yaml#/definitions/error"
445
          $ref: "../swagger.yaml#/definitions/error"
440
      "401":
446
      "401":
441
- 

Return to bug 36505