Bug 17432 - Remove requirement to minify swagger.json
Summary: Remove requirement to minify swagger.json
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Web services (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
: 17102 (view as bug list)
Depends on: 16212
Blocks: 17694
  Show dependency treegraph
 
Reported: 2016-10-12 12:02 UTC by Martin Renvoize
Modified: 2018-06-04 20:09 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
The minification of swagger.json is not more required; the deferenced version of the specification is now internally validated at runtime. Relavant errors output and the dereferenced schema has been made publically available at /api/v1/spec
Version(s) released in:


Attachments
Bug 17432: Remove superflous minification (40.58 KB, patch)
2016-10-12 12:06 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17432: Remove superflous minification (40.78 KB, patch)
2016-10-12 12:13 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 17432: Remove superflous minification (40.83 KB, patch)
2016-10-12 12:27 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 17432: Remove minification (40.92 KB, patch)
2016-10-12 12:47 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2016-10-12 12:02:02 UTC
This is an alternative to Bug #17102

Minification of the swagger.json file really serves no purpose.
Comment 1 Martin Renvoize 2016-10-12 12:06:16 UTC
Created attachment 56259 [details] [review]
Bug 17432: Remove superflous minification

The swagger specification file is currently superflously minified adding
manual steps to release management and restful api route development.
The minification is not required; The deferenced version of the
specification is now internally validated at runtime and relavant errors
output and the dereferenced schema has been made publically available at
/api/v1/spec
Comment 2 Martin Renvoize 2016-10-12 12:08:26 UTC
Removing this step should lower the onboarding time for developers wanting to work on RESTful api endpoints and also for those wishing to sign off and qa such bugs
Comment 3 Martin Renvoize 2016-10-12 12:13:30 UTC
Created attachment 56260 [details] [review]
Bug 17432: Remove superflous minification

The swagger specification file is currently superflously minified adding
manual steps to release management and restful api route development.
The minification is not required; The deferenced version of the
specification is now internally validated at runtime and relavant errors
output and the dereferenced schema has been made publically available at
/api/v1/spec

Test Plan
1) Apply patch
2) Ensure api routes still function (applying the /cities patch might be
    helpful)
3) Ensure /api/v1/spec page exists (it should be the de-referenced
    swagger.json file)
Comment 4 Claire Gravely 2016-10-12 12:27:09 UTC
Created attachment 56265 [details] [review]
Bug 17432: Remove superflous minification

The swagger specification file is currently superflously minified adding
manual steps to release management and restful api route development.
The minification is not required; The deferenced version of the
specification is now internally validated at runtime and relavant errors
output and the dereferenced schema has been made publically available at
/api/v1/spec

Test Plan
1) Apply patch
2) Ensure api routes still function (applying the /cities patch might be
    helpful)
3) Ensure /api/v1/spec page exists (it should be the de-referenced
    swagger.json file)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 5 Lari Taskula 2016-10-12 12:44:38 UTC
This is amazing! I wasn't aware that "spec_path" alone can make that. It makes the minificator useless and life easier for everyone.
Comment 6 Tomás Cohen Arazi 2016-10-12 12:47:16 UTC
Created attachment 56268 [details] [review]
Bug 17432: Remove minification

The swagger specification file is currently being minified adding
manual steps to release management and restful api route development.
The minification is not required; The deferenced version of the
specification is now internally validated at runtime and relavant errors
output and the dereferenced schema has been made publically available at
/api/v1/spec, so it can be copy&pasted into validation tools

Test Plan
1) Apply patch
2) Ensure api routes still function (applying the /cities patch might be
    helpful)
3) Ensure /api/v1/spec page exists (it should be the de-referenced
    swagger.json file)

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Brendan Gallagher 2016-10-12 13:41:50 UTC
Pushed to Master - Should be in the November 16.11 Release.  Thanks!
Comment 8 Katrin Fischer 2016-10-16 11:33:18 UTC
*** Bug 17102 has been marked as a duplicate of this bug. ***