Koha-clms/Koha/REST/Plugin
Tomas Cohen Arazi b4e3a0aaea Bug 37018: Add 400 response definition to all routes
This patch adds a test for well defined 400 responses on all verbs and
paths on the API spec.

The tests verify:

* Presence of 400 response definition
* The description must start with 'Bad request' (needs coding guideline)
* If DBIC queries are allowed on the route, then `invalid_query` needs
  to be mentioned in the description.

All routes get fixed to make the tests pass.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ yarn api:bundle
  k$ prove xt/api.t
=> SUCCESS: Tests pass!

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
2024-07-25 15:10:22 +00:00
..
Auth Bug 32178: (QA follow-up) Correct modules import 2022-11-18 12:04:32 -03:00
Exceptions.pm Bug 37018: Add 400 response definition to all routes 2024-07-25 15:10:22 +00:00
Objects.pm Bug 37018: Use validation in search_rs helper 2024-07-25 15:10:22 +00:00
Pagination.pm Bug 33080: Allow pagination to be built from stashed values 2023-03-10 12:04:06 -03:00
PluginRoutes.pm Bug 22678: Replace a few unneeded Koha::Logger calls 2022-10-24 14:37:03 -03:00
Query.pm Bug 37018: Clarify operators 2024-07-25 15:10:22 +00:00
Responses.pm Bug 36495: Add render_resource_not_found() and render_resource_deleted() helpers 2024-04-26 18:06:13 +02:00