Tomas Cohen Arazi
098e93e7cc
Bug 26181 introduced a way to override behavior through a new header, x-koha-override. And bug 27760 introduced a generic approach to handle x-koha-override. This patchset makes the POST /api/v1/holds route rely on this new way of handling x-koha-override instead of doing it manually. The header is added to the spec as a parameter. Note: the header should be defined as: "type": "array", "collectionFormat": "csv", "items": { "type": "string", "enum": [ "any" ] } but the versions of JSON::Validator we use have lots of bugs related to header type coercion, so it just doesn't work. The changelog for JSON::Validator is fairly elocuent about it. The override now takes a list of valid keywords (right now only 'any' but it would be fairly straight-forward to add a fairly granular set of options based on each possible AddReserve failure. To test: 1. Apply this patches 2. Run: $ kshell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 4. Sign off! Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> |
||
---|---|---|
.. | ||
acquisitions_funds.json | ||
acquisitions_orders.json | ||
acquisitions_vendors.json | ||
advancededitormacros.json | ||
biblios.json | ||
cash_registers.json | ||
checkouts.json | ||
circulation-rules.json | ||
cities.json | ||
clubs.json | ||
config_smtp_servers.json | ||
holds.json | ||
ill_backends.json | ||
illrequests.json | ||
import_batch_profiles.json | ||
items.json | ||
libraries.json | ||
oauth.json | ||
patrons.json | ||
patrons_account.json | ||
patrons_extended_attributes.json | ||
patrons_holds.json | ||
patrons_password.json | ||
public_patrons.json | ||
quotes.json | ||
return_claims.json | ||
rotas.json | ||
transfer_limits.yaml |