Tomas Cohen Arazi
748b2e91a3
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>
86 lines
2 KiB
JSON
86 lines
2 KiB
JSON
{
|
|
"/acquisitions/funds": {
|
|
"get": {
|
|
"x-mojo-to": "Acquisitions::Funds#list",
|
|
"operationId": "listFunds",
|
|
"tags": ["funds"],
|
|
"summary": "List funds",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [{
|
|
"name": "name",
|
|
"in": "query",
|
|
"description": "Case insensitive search on fund name",
|
|
"required": false,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "fund_owner_id",
|
|
"in": "query",
|
|
"description": "Display only the funds that belongs to the given patron ID",
|
|
"required": false,
|
|
"type": "integer"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/match"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/order_by"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/page"
|
|
},
|
|
{
|
|
"$ref": "../parameters.json#/per_page"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "A list of funds",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "../definitions.json#/fund"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Authentication required",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Access forbidden",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Fund 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": {
|
|
"acquisition": "budget_manage_all"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|