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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 28 02:59:06 CEST 2016


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

--- Comment #28 from Benjamin Rokseth <benjamin.rokseth at kul.oslo.kommune.no> ---
(In reply to Lari Taskula from comment #27)
> 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

Lari, I engaged in your discussion at github, but to be sure, are we talking
about the same thing? I test the swagger definitions at the online swagger
validator and it obviously fails at relative and URI, as they are not
resolvable to the validator. This is to be expected, but does not mean the
definition is invalid. The only way to validate online in any case would be to
first resolve all refs to one single json document.

You refer to invalid refs in swagger specifications, but I only find this
discussion in the swagger-ui

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


More information about the Koha-bugs mailing list