Bug 16212: Use swagger.min.json insted of swagger.json
authorLari Taskula <larit@student.uef.fi>
Tue, 14 Jun 2016 13:01:24 +0000 (16:01 +0300)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 25 Aug 2016 12:43:08 +0000 (12:43 +0000)
commitacee02948831d9105e4a7e31a003cf74dfd421be
tree8c287e5b1fc02457b8b4d25b549e20c96cc91c2f
parent1f71fe9eb5cc3de869643f565392a6705cea8c40
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.

Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi>
My name is Olli-Antti Kivilahti and I approve this commit.
We have been using the Swagger2.0-driven REST API on Mojolicious for 1 year now
in production and I am certain we have a pretty good idea on how to work with
the limitations of Swagger2.0

Signed-off-by: Johanna Raisa <johanna.raisa@gmail.com>
My name is Johanna Räisä and I approve this commit.
We have been using Swagger2.0-driven REST API in production successfully.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha/REST/V1.pm