Koha/api/v1/swagger/paths/clubs.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

137 lines
3.6 KiB
JSON

{
"/clubs/{club_id}/holds": {
"post": {
"x-mojo-to": "Clubs::Holds#add",
"operationId": "addClubHold",
"tags": [
"clubs"
],
"summary": "Add a club hold",
"parameters": [
{
"$ref": "../parameters.json#/club_id_pp"
},
{
"name": "body",
"in": "body",
"description": "A JSON object containing informations about the new hold",
"required": true,
"schema": {
"type": "object",
"properties": {
"biblio_id": {
"description": "Internal biblio identifier",
"type": [
"integer",
"null"
]
},
"item_id": {
"description": "Internal item identifier",
"type": [
"integer",
"null"
]
},
"pickup_library_id": {
"description": "Internal library identifier for the pickup library",
"type": "string"
},
"expiration_date": {
"description": "Hold end date",
"type": [
"string",
"null"
],
"format": "date"
},
"notes": {
"description": "Notes related to this hold",
"type": [
"string",
"null"
]
},
"item_type": {
"description": "Limit hold on one itemtype (ignored for item-level holds)",
"type": [
"string",
"null"
]
},
"default_patron_home": {
"description": "For each patron, set pickup location to patron's home library if possible",
"type": "integer"
}
},
"required": [
"pickup_library_id"
],
"additionalProperties": false
}
}
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"responses": {
"201": {
"description": "Created club hold",
"schema": {
"$ref": "../definitions/club_hold.json"
}
},
"400": {
"description": "Missing or wrong parameters",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"401": {
"description": "Authentication required",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"403": {
"description": "Hold not allowed",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"404": {
"description": "Club not found",
"schema": {
"$ref": "../definitions.json#/error"
}
},
"409": {
"description": "Hold not allowed",
"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": {
"reserveforothers": "1"
}
}
}
}
}