Browse Source

Bug 30275: Add alias to create renewal in api routes

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
22.11.x
Martin Renvoize 2 years ago
committed by Tomas Cohen Arazi
parent
commit
14a8e322e6
Signed by: tomascohen GPG Key ID: 0A272EA1B2F3C15F
  1. 40
      api/v1/swagger/paths/checkouts.yaml

40
api/v1/swagger/paths/checkouts.yaml

@ -149,6 +149,44 @@
permissions:
circulate: circulate_remaining_permissions
"/checkouts/{checkout_id}/renewals":
post:
x-mojo-to: Checkouts#renew
operationId: renewsCheckout
tags:
- checkouts
summary: Renew a checkout
parameters:
- $ref: ../parameters.yaml#/checkout_id_pp
- $ref: ../parameters.yaml#/seen_pp
produces:
- application/json
responses:
"201":
description: Updated borrower's checkout
schema:
$ref: ../definitions.yaml#/checkout
"403":
description: Cannot renew checkout
schema:
$ref: ../definitions.yaml#/error
"404":
description: Checkout not found
schema:
$ref: ../definitions.yaml#/error
"500":
description: |
Internal server error. Possible `error_code` attribute values:
* `internal_server_error`
schema:
$ref: ../definitions.yaml#/error
"503":
description: Under maintenance
schema:
$ref: ../definitions.yaml#/error
x-koha-authorization:
permissions:
circulate: circulate_remaining_permissions
get:
x-mojo-to: Checkouts#get_renewals
operationId: getRenewals
@ -163,7 +201,7 @@
"200":
description: List of checkouts renewals
schema:
$ref: ../definitions.yaml#/renewal
$ref: ../definitions.yaml#/renewals
"403":
description: Access forbidden
schema:

Loading…
Cancel
Save