Koha/api/v1/swagger/paths/checkouts.json
Tomas Cohen Arazi 748b2e91a3 Bug 28463: Add summary to all routes
This patch adds a 'summary' entry to all routes and verbs. This way,
ReDoc will display a human-friendly description of the route, instead of
the operationId.

To test, repeat the testing steps in the previous patch, and notice that
we now have good descriptions.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-27 17:17:19 +02:00

150 lines
4.2 KiB
JSON

{
"/checkouts": {
"get": {
"x-mojo-to": "Checkouts#list",
"operationId": "listCheckouts",
"tags": ["checkouts"],
"summary": "List checkouts",
"parameters": [{
"$ref": "../parameters.json#/patron_id_qp"
}, {
"$ref": "../parameters.json#/page"
}, {
"$ref": "../parameters.json#/per_page"
}, {
"$ref": "../parameters.json#/match"
}, {
"$ref": "../parameters.json#/order_by"
},{
"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": "Patron not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
},
"x-koha-embed": [
"issuer"
]
}
},
"/checkouts/{checkout_id}": {
"get": {
"x-mojo-to": "Checkouts#get",
"operationId": "getCheckout",
"tags": ["checkouts"],
"summary": "Get checkout",
"parameters": [{
"$ref": "../parameters.json#/checkout_id_pp"
}],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Updated borrower's checkout",
"schema": { "$ref": "../definitions.json#/checkout" }
},
"403": {
"description": "Access forbidden",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
},
"x-koha-embed": [
"issuer"
]
}
},
"/checkouts/{checkout_id}/renewal": {
"post": {
"x-mojo-to": "Checkouts#renew",
"operationId": "renewCheckout",
"tags": ["checkouts"],
"summary": "Renew a checkout",
"parameters": [
{ "$ref": "../parameters.json#/checkout_id_pp" },
{ "$ref": "../parameters.json#/seen_pp" }
],
"produces": ["application/json"],
"responses": {
"201": {
"description": "Updated borrower's checkout",
"schema": { "$ref": "../definitions.json#/checkout" }
},
"403": {
"description": "Cannot renew checkout",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
}
}
},
"/checkouts/{checkout_id}/allows_renewal": {
"get": {
"x-mojo-to": "Checkouts#allows_renewal",
"operationId": "allows_renewalCheckout",
"tags": ["checkouts"],
"summary": "Get renewability for a checkout",
"parameters": [{
"$ref": "../parameters.json#/checkout_id_pp"
}],
"produces": ["application/json"],
"responses": {
"200": {
"description": "Checkout renewability information",
"schema": { "$ref": "../definitions.json#/allows_renewal" }
},
"403": {
"description": "Forbidden",
"schema": { "$ref": "../definitions.json#/error" }
},
"404": {
"description": "Checkout not found",
"schema": { "$ref": "../definitions.json#/error" }
}
},
"x-koha-authorization": {
"permissions": {
"circulate": "circulate_remaining_permissions"
}
}
}
}
}