[Bug 17102] New: Automatically minify swagger.json
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Bug ID: 17102 Summary: Automatically minify swagger.json Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Web services Assignee: koha-bugs@lists.koha-community.org Reporter: larit@student.uef.fi QA Contact: testopia@bugs.koha-community.org Since Bug 16212 introduces a minification script, it could be useful for developers to have their specification automatically minified without the need to run minifier for each modification. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Lari Taskula <larit@student.uef.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |16212 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212 [Bug 16212] Swagger specification separation and minification -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 --- Comment #1 from Lari Taskula <larit@student.uef.fi> --- Created attachment 54269 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=54269&action=edit Bug 17102: Automatically minify swagger.json This patch adds automatic minification of swagger.json. Since startup subroutine is executed on each call to REST API, we need to be careful to not do useless computation by minificating swagger.json when not required. Therefore, we need some algorithm to determine whether minification is needed. In this patch, minification is executed in two cases: 1. swagger.min.json does not exist 2. any of the specification files is modified more recently than swagger.min.json Includes tests. This feature requires Apache user to have write permissions to swagger.min.json, otherwise we cannot minify the specification automatically. Another solution is to run the minifySwagger.pl manually after each modification or create a daemon that listens to file modifications via "inotify" and executes minification when needed. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 --- Comment #2 from Lari Taskula <larit@student.uef.fi> --- Perhaps some parametrization is needed, it is probably not a good idea to run this in production. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I think this workflow wouldn't fit into Koha's QA process. And as you said, it shouldn't be encouraged in production. BUT maybe we could make kohadevbox have this as a feature for developers. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |In Discussion -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |benjamin.rokseth@kul.oslo.k | |ommune.no --- Comment #4 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- Just started a discussion on Bug 17243 on minifying swagger. Basically I propose adding it to the plack build sub of the api. Any thoughts on this? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 --- Comment #5 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I don't think we should automatically regenerate it. The deployed file should be production ready and no source of issues for end-users. It looks to me that we just need to provide ways for devs to set that if needed. Be it under kohadevbox or on regular dev setups. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 --- Comment #6 from Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> --- I certainly agree. As long as we keep the minified swagger out of source control, I'm happy. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |17432 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17432 [Bug 17432] Remove requirement to minify swagger.json -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17432 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|17432 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17432 [Bug 17432] Remove requirement to minify swagger.json -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17102 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |RESOLVED Resolution|--- |DUPLICATE CC| |katrin.fischer@bsz-bw.de --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- *** This bug has been marked as a duplicate of bug 17432 *** -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org