]> 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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 21 Mar 2023 16:35:49 +0000 (16:35 +0000)
commit0093c3683a708af16ff520d83982d1af14a19f68
tree4fe4b700ca5e2abbbf4273d751fcbe9cfd4f82dc
parentede74d0b3cc916bab1504dac1ec2e8f68c206a6c
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>
(cherry picked from commit 185b431ebfc869dde06ab87efcd562fc786388ae)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Koha/REST/V1/Biblios.pm
api/v1/swagger/paths/biblios.yaml
t/db_dependent/api/v1/biblios.t