Browse Source

Bug 27366: Spec changes

Add /api/v1/patrons/{patron_id}/holds route and holds object description
to the OpenAPI specification.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.05.x
Tomas Cohen Arazi 1 year ago
committed by Jonathan Druart
parent
commit
e32b2a9449
  1. 3
      api/v1/swagger/paths.json
  2. 87
      api/v1/swagger/paths/patrons_holds.json

3
api/v1/swagger/paths.json

@ -119,6 +119,9 @@
"/patrons/{patron_id}/account/credits": {
"$ref": "paths/patrons_account.json#/~1patrons~1{patron_id}~1account~1credits"
},
"/patrons/{patron_id}/holds": {
"$ref": "paths/patrons_holds.json#/~1patrons~1{patron_id}~1holds"
},
"/patrons/{patron_id}/password": {
"$ref": "paths/patrons_password.json#/~1patrons~1{patron_id}~1password"
},

87
api/v1/swagger/paths/patrons_holds.json

@ -0,0 +1,87 @@
{
"/patrons/{patron_id}/holds": {
"get": {
"x-mojo-to": "Patrons::Holds#list",
"operationId": "getPatronHolds",
"tags": [
"patrons",
"holds"
],
"parameters": [
{
"$ref": "../parameters.json#/patron_id_pp"
},
{
"$ref": "../parameters.json#/match"
},
{
"$ref": "../parameters.json#/order_by"
},
{
"$ref": "../parameters.json#/page"
},
{
"$ref": "../parameters.json#/per_page"
},
{
"$ref": "../parameters.json#/q_param"
},
{
"$ref": "../parameters.json#/q_body"
},
{
"$ref": "../parameters.json#/q_header"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "The patron holds",
"schema": {
"type": "array",
"items": {
"$ref": "../definitions.json#/hold"
}
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Access forbidden",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Patron not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"503": {
"description": "Under maintenance",
"schema": {
"$ref": "../definitions.json#/error"
}
}
},
"x-koha-authorization": {
"permissions": {
"borrowers": "edit_borrowers"
}
}
}
}
}
Loading…
Cancel
Save