Koha/api/v1/swagger/paths
Tomas Cohen Arazi 098e93e7cc Bug 27797: Make POST /holds use the stashed koha.overrides
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>
2021-05-04 14:22:03 +02:00
..
acquisitions_funds.json
acquisitions_orders.json Bug 20212: Add more embeddable objects to orders 2021-01-28 16:44:11 +01:00
acquisitions_vendors.json
advancededitormacros.json
biblios.json Bug 27932: Add GET /biblios/:biblio_id/pickup_locations route 2021-04-30 17:19:01 +02:00
cash_registers.json Bug 26273: (follow-up) Add 'Cashier' to the cashups table 2021-03-11 16:33:25 +01:00
checkouts.json Bug 24083: Add support for unseen_renewals 2020-11-11 16:09:58 +01:00
circulation-rules.json
cities.json
clubs.json Bug 27330: (QA follow-up) Return 409 instead 2021-02-01 16:36:38 +01:00
config_smtp_servers.json
holds.json Bug 27797: Make POST /holds use the stashed koha.overrides 2021-05-04 14:22:03 +02:00
ill_backends.json
illrequests.json
import_batch_profiles.json Bug 23019: (follow-up) Fix test permissions and API definition bugs 2020-11-11 15:55:49 +01:00
items.json
libraries.json
oauth.json
patrons.json Bug 27855: Add 'extended_attributes' embedding to the spec 2021-03-09 10:31:47 +01:00
patrons_account.json
patrons_extended_attributes.json Bug 23666: Add PATCH /patron/:patron_id/extended_attributes/:extended_attribute_id 2021-04-22 14:50:11 +02:00
patrons_holds.json Bug 27366: Spec changes 2021-03-16 16:08:31 +01:00
patrons_password.json
public_patrons.json
quotes.json Bug 27251: Rewrite QOTD with the Koha REST API 2021-01-29 09:03:45 +01:00
return_claims.json
rotas.json
transfer_limits.yaml Bug 26633: Add API documentation 2021-03-16 16:08:30 +01:00