Koha-clms/api/v1/swagger
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
..
definitions Bug 37021: Change item_id type as integer in holds endpoint 2024-07-10 16:54:54 +00:00
parameters Bug 29002: Add bookings objects and API classes 2023-11-03 12:04:07 -03:00
paths Bug 37018: Add 400 response definition to all routes 2024-07-25 15:10:22 +00:00
swagger.yaml Bug 37018: Clarify operators 2024-07-25 15:10:22 +00:00