Bug 29290: Add spec changes
This patch adds the new route. It also tweaks the checkout object definition to allow embedding the required related objects (for bug 29275). Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
84f5167108
commit
6ff32002da
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
"$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.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue