Koha-clms/api/v1/swagger/paths
Martin Renvoize 3a05b239db
Bug 29016 [25.11.x]: (QA follow-up) Expand action_logs API and test coverage
Build on the new ActionLog DBIC relations to expose them as opt-in
embeds, and shore up gaps in the test coverage that QA flagged.

Swagger
  * paths/action_logs.yaml declares an x-koha-embed header parameter
    constrained to the supported relations (librarian, patron).
  * definitions/action_log.yaml adds the corresponding optional
    `librarian` and `patron` object fields.

Tests
  * Convert the single 24-test subtest into focused subtests:
    - authorization (403 vs 200)
    - simple typed filters
    - q-DSL: multi-value module, info LIKE, combined filter
    - embeds: librarian and patron, with and without x-koha-embed
    - pagination + X-Total-Count and order_by
  * Mock AuthSuccessLog/AuthFailureLog/BorrowersLog to 0 to remove the
    flakiness where the API GET itself appended an AUTH log row between
    delete and assertion.
  * Build the test librarian with both `tools` and `borrowers` flags so
    embedded patron fields are not redacted by Koha::Patron->is_accessible.
  * Use a small build_fixtures() helper to avoid copy-pasting setup
    across subtests.

Test plan:
  1. yarn build && restart_all  (refresh swagger bundle)
  2. prove t/db_dependent/api/v1/action_logs.t  (all subtests green)
  3. curl -H 'x-koha-embed: librarian,patron' \
       /api/v1/action_logs?module=MEMBERS  -- patron and librarian
       objects appear in the response.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
2026-05-24 13:42:26 +01:00
..
acquisitions_baskets.yaml
…
acquisitions_edifiles.yaml
…
acquisitions_funds.yaml
…
acquisitions_orders.yaml
…
acquisitions_vendor_issues.yaml
…
acquisitions_vendors.yaml Bug 41594: Add Cypress tests 2026-04-02 18:31:10 +01:00
acquisitions_vendors_config.yaml
…
action_logs.yaml Bug 29016 [25.11.x]: (QA follow-up) Expand action_logs API and test coverage 2026-05-24 13:42:26 +01:00
additional_contents.yaml
…
advancededitormacros.yaml
…
article_requests.yaml
…
auth.yaml
…
authorised_value_categories.yaml
…
authorised_values.yaml
…
authorities.yaml Bug 41901: Allow duplicate check when adding authority via API 2026-05-24 13:42:22 +01:00
biblios.yaml Bug 35380: Make updateBiblio-API respect Record overlay rules 2026-05-24 13:42:13 +01:00
biblios_item_groups.yaml
…
biblios_merge.yaml
…
bookings.yaml
…
cash_registers.yaml Bug 41751: Allow anonymous_refund permission to access cashups API 2026-05-24 13:42:24 +01:00
checkouts.yaml
…
circulation_rules.yaml
…
cities.yaml
…
clubs.yaml
…
config_file_transports.yaml
…
config_smtp_servers.yaml
…
deleted_biblios.yaml
…
erm_agreements.yaml
…
erm_config.yaml
…
erm_counter_files.yaml
…
erm_counter_logs.yaml
…
erm_counter_registries.yaml
…
erm_custom_reports.yaml
…
erm_default_usage_reports.yaml
…
erm_documents.yaml
…
erm_eholdings_packages.yaml
…
erm_eholdings_packages_resources.yaml
…
erm_eholdings_resources.yaml
…
erm_eholdings_titles.yaml
…
erm_eholdings_titles_resources.yaml
…
erm_extended_attribute_types.yaml
…
erm_licenses.yaml
…
erm_sushi_services.yaml
…
erm_usage_data_providers.yaml
…
erm_usage_databases.yaml
…
erm_usage_items.yaml
…
erm_usage_platforms.yaml
…
erm_usage_titles.yaml
…
erm_users.yaml
…
extended_attribute_types.yaml
…
holds.yaml Bug 23269: (follow-up) Rename to item_level_holds_count and add tests 2026-05-24 13:42:11 +01:00
ill_backends.yaml
…
ill_batches.yaml
…
ill_batchstatuses.yaml
…
ill_requests.yaml
…
import_batch_profiles.yaml
…
import_batches.yaml
…
item_types.yaml
…
items.yaml Bug 40154: prevent deletion of items with holds 2026-03-23 12:32:24 +00:00
jobs.yaml
…
libraries.yaml Bug 42206: (follow-up) Rename to /closed_dates, improve efficiency 2026-05-24 13:42:24 +01:00
lists.yaml
…
oauth.yaml
…
patron_categories.yaml
…
patrons.yaml Bug 41733: Honor EmailPatronRegistrations in the API 2026-05-24 13:42:18 +01:00
patrons_account.yaml
…
patrons_checkouts.yaml
…
patrons_extended_attributes.yaml
…
patrons_hold_groups.yaml Bug 41849: Add cancel hold_group REST API endpoint 2026-05-24 13:42:16 +01:00
patrons_holds.yaml
…
patrons_password.yaml
…
patrons_recalls.yaml
…
preservation_config.yaml
…
preservation_processings.yaml
…
preservation_trains.yaml
…
preservation_waiting_list.yaml
…
public_oauth.yaml
…
public_patrons.yaml
…
quotes.yaml
…
record_sources.yaml Bug 35380: Change record sources to by systemdefined 2026-05-24 13:42:13 +01:00
return_claims.yaml
…
rotas.yaml
…
search_filters.yaml
…
sip2_accounts.yaml
…
sip2_institutions.yaml
…
sip2_system_preference_overrides.yaml
…
suggestions.yaml
…
tickets.yaml
…
transfer_limits.yaml
…