@@ -, +, @@ --- api/v1/swagger/definitions/checkout.json | 21 +++++++ api/v1/swagger/paths.json | 3 + api/v1/swagger/paths/biblios.json | 76 ++++++++++++++++++++++++ api/v1/swagger/paths/checkouts.json | 8 ++- 4 files changed, 107 insertions(+), 1 deletion(-) --- a/api/v1/swagger/definitions/checkout.json +++ a/api/v1/swagger/definitions/checkout.json @@ -83,6 +83,27 @@ "null" ], "description": "The object representing the checkout issuer" + }, + "item": { + "type": [ + "object", + "null" + ], + "description": "The object representing the checked out item" + }, + "library": { + "type": [ + "object", + "null" + ], + "description": "The object representing the checkout library" + }, + "patron": { + "type": [ + "object", + "null" + ], + "description": "The object representing the checkout patron" } }, "additionalProperties": false --- a/api/v1/swagger/paths.json +++ a/api/v1/swagger/paths.json @@ -23,6 +23,9 @@ "/biblios/{biblio_id}": { "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}" }, + "/biblios/{biblio_id}/checkouts": { + "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1checkouts" + }, "/biblios/{biblio_id}/items": { "$ref": "paths/biblios.json#/~1biblios~1{biblio_id}~1items" }, --- a/api/v1/swagger/paths/biblios.json +++ a/api/v1/swagger/paths/biblios.json @@ -132,6 +132,82 @@ } } }, + "/biblios/{biblio_id}/checkouts": { + "get": { + "x-mojo-to": "Biblios#get_checkouts", + "operationId": "listBiblioCheckouts", + "tags": [ + "checkouts" + ], + "summary": "List checkouts for a biblio", + "parameters": [ + { + "$ref": "../parameters.json#/biblio_id_pp" + }, + { + "$ref": "../parameters.json#/page" + }, + { + "$ref": "../parameters.json#/per_page" + }, + { + "$ref": "../parameters.json#/match" + }, + { + "$ref": "../parameters.json#/order_by" + }, + { + "$ref": "../parameters.json#/q_param" + }, + { + "$ref": "../parameters.json#/q_body" + }, + { + "$ref": "../parameters.json#/q_header" + }, + { + "name": "checked_in", + "in": "query", + "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.", + "type": "boolean" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "A list of checkouts", + "schema": { + "$ref": "../definitions.json#/checkouts" + } + }, + "403": { + "description": "Access forbidden", + "schema": { + "$ref": "../definitions.json#/error" + } + }, + "404": { + "description": "Biblio not found", + "schema": { + "$ref": "../definitions.json#/error" + } + } + }, + "x-koha-authorization": { + "permissions": { + "circulate": "circulate_remaining_permissions" + } + }, + "x-koha-embed": [ + "issuer", + "item", + "patron", + "library" + ] + } + }, "/biblios/{biblio_id}/items": { "get": { "x-mojo-to": "Biblios#get_items", --- a/api/v1/swagger/paths/checkouts.json +++ a/api/v1/swagger/paths/checkouts.json @@ -15,7 +15,13 @@ "$ref": "../parameters.json#/match" }, { "$ref": "../parameters.json#/order_by" - },{ + }, { + "$ref": "../parameters.json#/q_param" + }, { + "$ref": "../parameters.json#/q_body" + }, { + "$ref": "../parameters.json#/q_header" + }, { "name": "checked_in", "in": "query", "description": "By default, current checkouts are returned, when this is true then checked in checkouts are returned as result.", --