00a50a9400
To test: 1. Run t/db_dependent/api/v1/holds.t 2. Run t/db_dependent/api/v1/patrons.t Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
73 lines
1.6 KiB
JSON
73 lines
1.6 KiB
JSON
{
|
|
"/patrons": {
|
|
"get": {
|
|
"operationId": "listPatrons",
|
|
"tags": ["patrons"],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of patrons",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "../definitions.json#/patron"
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Access forbidden",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
}
|
|
},
|
|
"x-koha-authorization": {
|
|
"permissions": {
|
|
"borrowers": "1"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/patrons/{borrowernumber}": {
|
|
"get": {
|
|
"operationId": "getPatron",
|
|
"tags": ["patrons"],
|
|
"parameters": [{
|
|
"$ref": "../parameters.json#/borrowernumberPathParam"
|
|
}
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A patron",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/patron"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Access forbidden",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Patron not found",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
}
|
|
},
|
|
"x-koha-authorization": {
|
|
"allow-owner": true,
|
|
"allow-guarantor": true,
|
|
"permissions": {
|
|
"borrowers": "1"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|