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

(-)a/api/v1/swagger/paths.json (+3 lines)
Lines 20-25 Link Here
20
  "/holds/{hold_id}": {
20
  "/holds/{hold_id}": {
21
    "$ref": "paths/holds.json#/~1holds~1{hold_id}"
21
    "$ref": "paths/holds.json#/~1holds~1{hold_id}"
22
  },
22
  },
23
  "/holds/{hold_id}/suspension": {
24
    "$ref": "paths/holds.json#/~1holds~1{hold_id}~1suspension"
25
  },
23
  "/patrons": {
26
  "/patrons": {
24
    "$ref": "paths/patrons.json#/~1patrons"
27
    "$ref": "paths/patrons.json#/~1patrons"
25
  },
28
  },
(-)a/api/v1/swagger/paths/holds.json (-1 / +132 lines)
Lines 386-390 Link Here
386
        }
386
        }
387
      }
387
      }
388
    }
388
    }
389
  },
390
  "/holds/{hold_id}/suspension": {
391
    "post": {
392
      "x-mojo-to": "Holds#suspend",
393
      "operationId": "suspendHold",
394
      "tags": ["holds"],
395
      "parameters": [{
396
          "$ref": "../parameters.json#/hold_id_pp"
397
        }, {
398
          "name": "body",
399
          "in": "body",
400
          "description": "A JSON object containing fields to modify",
401
          "required": false,
402
          "schema": {
403
            "type": "object",
404
            "properties": {
405
              "expiration_date": {
406
                "description": "Date the hold suspension expires",
407
                "type": "string",
408
                "format": "date"
409
              }
410
            }
411
          }
412
        }
413
      ],
414
      "consumes": ["application/json"],
415
      "produces": ["application/json"],
416
      "responses": {
417
        "201": {
418
          "description": "Hold suspended"
419
        },
420
        "400": {
421
          "description": "Missing or wrong parameters",
422
          "schema": {
423
            "$ref": "../definitions.json#/error"
424
          }
425
        },
426
        "401": {
427
          "description": "Authentication required",
428
          "schema": {
429
            "$ref": "../definitions.json#/error"
430
          }
431
        },
432
        "403": {
433
          "description": "Hold not allowed",
434
          "schema": {
435
            "$ref": "../definitions.json#/error"
436
          }
437
        },
438
        "404": {
439
          "description": "Hold not found",
440
          "schema": {
441
            "$ref": "../definitions.json#/error"
442
          }
443
        },
444
        "500": {
445
          "description": "Internal server error",
446
          "schema": {
447
            "$ref": "../definitions.json#/error"
448
          }
449
        },
450
        "503": {
451
          "description": "Under maintenance",
452
          "schema": {
453
            "$ref": "../definitions.json#/error"
454
          }
455
        }
456
      },
457
      "x-koha-authorization": {
458
        "permissions": {
459
          "reserveforothers": "1"
460
        }
461
      }
462
    },
463
    "delete": {
464
      "x-mojo-to": "Holds#resume",
465
      "operationId": "resumeHold",
466
      "tags": ["holds"],
467
      "parameters": [
468
        {
469
          "$ref": "../parameters.json#/hold_id_pp"
470
        }
471
      ],
472
      "consumes": ["application/json"],
473
      "produces": ["application/json"],
474
      "responses": {
475
        "204": {
476
          "description": "Hold resumed"
477
        },
478
        "400": {
479
          "description": "Missing or wrong parameters",
480
          "schema": {
481
            "$ref": "../definitions.json#/error"
482
          }
483
        },
484
        "401": {
485
          "description": "Authentication required",
486
          "schema": {
487
            "$ref": "../definitions.json#/error"
488
          }
489
        },
490
        "403": {
491
          "description": "Hold not allowed",
492
          "schema": {
493
            "$ref": "../definitions.json#/error"
494
          }
495
        },
496
        "404": {
497
          "description": "Hold not found",
498
          "schema": {
499
            "$ref": "../definitions.json#/error"
500
          }
501
        },
502
        "500": {
503
          "description": "Internal server error",
504
          "schema": {
505
            "$ref": "../definitions.json#/error"
506
          }
507
        },
508
        "503": {
509
          "description": "Under maintenance",
510
          "schema": {
511
            "$ref": "../definitions.json#/error"
512
          }
513
        }
514
      },
515
      "x-koha-authorization": {
516
        "permissions": {
517
          "reserveforothers": "1"
518
        }
519
      }
520
    }
389
  }
521
  }
390
}
522
}
391
- 

Return to bug 22206