[Koha-bugs] [Bug 30194] Update required JSON::Validator version

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Mar 25 20:36:48 CET 2022


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

--- Comment #73 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 132252
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132252&action=edit
Bug 30194: Auto generate swagger.yaml

It was not sorted correct and had inconsistencies.

use YAML;
use File::Slurp qw( write_file );
my $hash = YAML::LoadFile('api/v1/swagger/swagger.yaml');
YAML::Bless($hash)->keys([qw(swagger basePath definitions parameters paths info
tags)]);
my $info = $hash->{info};
YAML::Bless($info)->keys([qw(title version license contact description)]);
my $yaml= YAML::Dump($hash);
$yaml =~ s|'|"|xmsg;
write_file('api/v1/swagger/swagger.yaml', $yaml);

Signed-off-by: Martin Renvoize <martin.renvoize at ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

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


More information about the Koha-bugs mailing list