Koha/api/v1/swagger/definitions.json
Julian Maurice e3f2e346f8 Bug 13895: Add API routes for checkouts retrieval and renewal
GET /checkouts?borrowernumber={borrowernumber}
GET /checkouts/{checkout_id}
PUT /checkouts/{checkout_id}

+ unit tests in t/db_dependent/api/v1/checkouts.t

Test plan:
1. Open a browser tab on Koha staff and log in (to create CGISESSID
   cookie). You should have permission circulate_remaining_permissions.
2. Go to http://yourlibrary/api/v1/checkouts?borrowernumber=XXX (replace
   XXX with a borrowernumber that has checkouts) and check you receive
   correct data
3. Go to http://yourlibrary/api/v1/checkouts/YYY (replace YYY with an
   existing checkout id) and check you receive correct data
4. Send PUT requests to http://yourlibrary/api/v1/checkouts/YYY until
   the maximum number of renewals is reached (you should have a 403
   error)
5. Run unit tests in t/db_dependent/api/v1/checkouts.t

Depends on bugs 16699 and 14868

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>

Signed-off-by: Lari Taskula <larit@student.uef.fi>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-28 19:38:41 +00:00

41 lines
798 B
JSON

{
"account_line": {
"$ref": "definitions/account_line.json"
},
"city": {
"$ref": "definitions/city.json"
},
"error": {
"$ref": "definitions/error.json"
},
"hold": {
"$ref": "definitions/hold.json"
},
"checkouts": {
"$ref": "definitions/checkouts.json"
},
"checkout": {
"$ref": "definitions/checkout.json"
},
"holds": {
"$ref": "definitions/holds.json"
},
"library": {
"$ref": "definitions/library.json"
},
"patron": {
"$ref": "definitions/patron.json"
},
"patron_account_credit": {
"$ref": "definitions/patron_account_credit.json"
},
"patron_balance": {
"$ref": "definitions/patron_balance.json"
},
"vendor": {
"$ref": "definitions/vendor.json"
},
"fund": {
"$ref": "definitions/fund.json"
}
}