https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17243
--- Comment #4 from Benjamin Rokseth <[email protected]> --- Thinking more of it, I would recommend the plack build solution. Something in the line of adding a sub to plack.psgi: sub minifySwagger { use Swagger2; my $swagger = Swagger2->new('/usr/share/koha/api/v1/swagger/swagger.json'); $swagger = $swagger->expand; #Fetch all JSON-Schema references my $data = $swagger->api_spec->data; delete($data->{id}); # delete non-valid "/id" open(SWOUT, ">:encoding(UTF-8)", '/usr/share/koha/api/v1/swagger/swagger.min.json') print SWOUT $swagger->to_string(); close(SWOUT); } and calling it inside the build method of the api. Obviously with some error-handling and relative paths. Thoughts? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
