[Koha-bugs] [Bug 16212] Swagger specification separation and minification

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jul 27 18:32:30 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16212

--- Comment #27 from Lari Taskula <larit at student.uef.fi> ---
Hey Benjamin, thanks for the interest! I'm glad we share a desire to split our
specification :)

(In reply to Benjamin Rokseth from comment #26)
> Also I'm not sure of the need to minify swagger at all. If the only reason
> is for the online validation, I would argue that the online validation is
> the problem. More important is `mojo swagger2 validate`.
Our spec in master is not a valid Swagger spec, even if `mojo swagger2
validate` says so. Swagger specification does not support a reference whole
Definitions-object in swagger.json like this:

"definitions": {
  "$ref": "./definitions/index.json"
}

That is super annoying, but I think we also want to validate against the online
validator because it spots this issue. `mojo swagger2 validate` works (for
now), but what if the plugin's validator is updated to consider this type of
$ref invalid (as Swagger specification says)? We would have to place all
definitions and paths in swagger.json, and at maximum $ref individual paths and
definitions to external files, not the whole Paths / Definitions-object.

I think Olli-Antti also encountered some other issues that this minifier fixes.
Maybe he can comment more about it.

Btw, I have opened an issue to Swagger2 plugin's GitHub to initiate some more
discussion: https://github.com/jhthorsen/swagger2/issues/89

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list