]> git.koha-community.org Git - koha.git/commit
Bug 30394: Add x-koha-request-id support on API routes
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 30 Mar 2022 11:54:24 +0000 (13:54 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 4 Apr 2022 14:23:46 +0000 (16:23 +0200)
commitb25f6f1c304dca83c1da95dcc6d75cfbd2c977a4
treee4f6a5bc6be1b921418744a9164bfe92409ce79f
parent9aea9241f3a3fa084b3eaa25d007c69ed7ea40f8
Bug 30394: Add x-koha-request-id support on API routes

This patch adds the x-koha-request-id to all GET routes that rely on
objects.search, for immediate support for the header.

The patch itself is trivial:
- It adds the header parameter definition to the top level swagger.yaml
- It adds a reference on each route that already implements q params,
  etc

To test:
1. Apply the patch
2. Reload plack
3. Notice the API still works
4. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/query.t
=> SUCCESS: It now passes! The /cities route implements the
x-koha-request-id header pass through.
5. Run the rest of the API tests
=> SUCCESS: All good
6. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
20 files changed:
api/v1/swagger/paths/acquisitions_funds.yaml
api/v1/swagger/paths/acquisitions_orders.yaml
api/v1/swagger/paths/acquisitions_vendors.yaml
api/v1/swagger/paths/advancededitormacros.yaml
api/v1/swagger/paths/biblios.yaml
api/v1/swagger/paths/cash_registers.yaml
api/v1/swagger/paths/checkouts.yaml
api/v1/swagger/paths/cities.yaml
api/v1/swagger/paths/config_smtp_servers.yaml
api/v1/swagger/paths/holds.yaml
api/v1/swagger/paths/import_batch_profiles.yaml
api/v1/swagger/paths/items.yaml
api/v1/swagger/paths/libraries.yaml
api/v1/swagger/paths/patrons.yaml
api/v1/swagger/paths/patrons_extended_attributes.yaml
api/v1/swagger/paths/patrons_holds.yaml
api/v1/swagger/paths/quotes.yaml
api/v1/swagger/paths/suggestions.yaml
api/v1/swagger/paths/transfer_limits.yaml
api/v1/swagger/swagger.yaml