[Koha-bugs] [Bug 33227] OpenAPI validation is failing for paths/biblios.yaml

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 16 16:13:34 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33227

--- Comment #6 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 148269
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148269&action=edit
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

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list