Browse Source

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>
21.11/bug30761
Tomás Cohen Arazi 12 months ago
committed by Jonathan Druart
parent
commit
6ff32002da
  1. 21
      api/v1/swagger/definitions/checkout.json
  2. 3
      api/v1/swagger/paths.json
  3. 76
      api/v1/swagger/paths/biblios.json
  4. 2
      api/v1/swagger/paths/checkouts.json

21
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

3
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"
},

76
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",

2
api/v1/swagger/paths/checkouts.json

@ -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…
Cancel
Save