[Koha-bugs] [Bug 26633] Add advanced editor for transfer limits

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Feb 10 13:20:57 CET 2021


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

--- Comment #53 from Kyle M Hall <kyle at bywatersolutions.com> ---
(In reply to Kyle M Hall from comment #52)
> (In reply to Jonathan Druart from comment #51)
> > How did you check, Kyle?
> > 
> > The script is only returning the error from YAML::LoadFile
> > 
> > YAML Error: Can't parse double quoted string
> >    Code: YAML_PARSE_ERR_BAD_DOUBLE
> >    Line: 149
> >    Document: 1
> >  at /usr/share/perl5/YAML/Loader.pm line 574.
> 
> I used yamllint. Looks like I'll have to do some more digging!

So the problem is the YAML module is insufficient for running this test. I
would recommend we switch to YAML::XS. The current YAML module is being
deprecated anyway and is being move to YAML::Old.

root at kohadevbox:koha(bug26633-qa)$ perl -e "use YAML qw(LoadFile);
LoadFile('api/v1/swagger/paths/transfer_limits.yaml');"
YAML Error: Invalid element in map
   Code: YAML_LOAD_ERR_BAD_MAP_ELEMENT
   Line: 8
   Document: 1
 at /usr/share/perl5/YAML/Loader.pm line 350.
root at kohadevbox:koha(bug26633-qa)$ perl -e "use YAML::XS qw(LoadFile);
LoadFile('api/v1/swagger/paths/transfer_limits.yaml');"
root at kohadevbox:koha(bug26633-qa)$ 

Basically, YAML only supports YAML 1.0, where YAML::XS ( and
Mojolicious::Plugin::OpenAPI ) support YAML 1.1.

I would recommend as a first step that QohA::File::YAML be updated to use
YAML::XS as a first step.

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


More information about the Koha-bugs mailing list