[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
Mon Mar 20 12:01:07 CET 2023


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

Martin Renvoize <martin.renvoize at ptfs-europe.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #148269|0                           |1
        is obsolete|                            |

--- Comment #8 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 148408
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=148408&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

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>

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


More information about the Koha-bugs mailing list