Bugzilla – Attachment 52369 Details for
Bug 16212
Swagger specification separation and minification
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16212: Use swagger.min.json insted of swagger.json
Bug-16212-Use-swaggerminjson-insted-of-swaggerjson.patch (text/plain), 1.35 KB, created by
Lari Taskula
on 2016-06-14 13:18:58 UTC
(
hide
)
Description:
Bug 16212: Use swagger.min.json insted of swagger.json
Filename:
MIME Type:
Creator:
Lari Taskula
Created:
2016-06-14 13:18:58 UTC
Size:
1.35 KB
patch
obsolete
>From 08da4a5198a66fb49254b73e86f9217b02494db1 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Tue, 14 Jun 2016 16:01:24 +0300 >Subject: [PATCH] Bug 16212: Use swagger.min.json insted of swagger.json > >Our current approach with splitting the Swagger specification brings problems. >For example, in swagger.json, if we split the whole "definitions" object with >$ref, validations will fail with online.swagger.io validator. > >(See http://online.swagger.io/validator/debug?url=url_to_your_swagger_json) > >The problem also occurs with "paths" (Paths Object), because simply $ref to all >paths for example in /paths/index.json does not meet the Swagger2 specification. > >The problem is solved by using the minification script and the minified version >of swagger.json after which the swagger.min.json is valid Swagger2 specification, >because the minifier resolves the problematic $refs of swagger.json file in the >minified version. >--- > Koha/REST/V1.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/REST/V1.pm b/Koha/REST/V1.pm >index b692a38..1bfda46 100644 >--- a/Koha/REST/V1.pm >+++ b/Koha/REST/V1.pm >@@ -50,7 +50,7 @@ sub startup { > > $self->plugin(Swagger2 => { > route => $route, >- url => $self->home->rel_file("api/v1/swagger.json"), >+ url => $self->home->rel_file("api/v1/swagger.min.json"), > }); > } > >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16212
:
49949
|
49950
|
52368
|
52369
|
52576
|
52589
|
52590
|
52601
|
52651
|
52952
|
52953
|
52954
|
52955
|
52968
|
52969
|
52970
|
52971
|
52972
|
52973
|
52982
|
52983
|
52984
|
52985
|
54286
|
54287
|
54288
|
54870
|
54871
|
54872
|
54873