]> git.koha-community.org Git - koha.git/commit
Bug 33227: Remove invalid spec and adjust the code accordingly
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 16 Mar 2023 13:50:33 +0000 (10:50 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 20 Mar 2023 12:39:50 +0000 (09:39 -0300)
commit185b431ebfc869dde06ab87efcd562fc786388ae
tree85660ecef8e34f1e1dc34e3514eee98ed2d9e625
parent502e34e9b0f709d0ab9260da107c1c1e5c7e11d8
Bug 33227: Remove invalid spec and adjust the code accordingly

The spec contains a non-standard definition for the body param. Removing
it from the spec makes us need to handle the 'body' manually in the case
of JSON data.

This patch basically does that. It also changes the uses of
$c->validation, which are discouraged by the
Mojolicious::Plugin::OpenAPI dev/maintainer. I do it to highlight what
we must do in other places and the fact that there's no behavior change.

To test:
1. Apply this patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t \
           xt/api.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/REST/V1/Biblios.pm
api/v1/swagger/paths/biblios.yaml
t/db_dependent/api/v1/biblios.t