Koha/api/v1/swagger/paths/clubs.json
Jonathan Druart 9de4594cf7 Bug 28461: Specify only one tag per route
Or the route will be misplaced when generated by redoc

git grep tags api|grep '",'

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2021-05-26 14:59:26 +02:00

111 lines
3.8 KiB
JSON

{
"/clubs/{club_id}/holds": {
"post": {
"x-mojo-to": "Clubs::Holds#add",
"operationId": "addClubHold",
"tags": ["clubs"],
"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 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": "Hold 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"
}
}
}
}
}