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

--- Comment #2 from Lari Taskula <[email protected]> ---
Thanks for the interest! Unfortunately, I am having some issues with this
approach. The specifications won't validate through Swagger-UI validator
(online.swagger.io/validator/debug?url=url_to_your_swagger.json). I read a
little about the issue, and to my understanding the structure I described above
does not seem to meet Swagger2 specification. It seems that the Paths Object
does not take a $ref, but Path Item Object, which can take a $ref. This means
that we would not meet the Swagger2 specification if we attempted something
like this in swagger.json:

..
"paths": {
  "$ref": "paths/index.json"
},
..

In fact the same error happens when running the current master version (the
definitions/index.json in Bug 15126) against online.swagger.io-validator. This
is the error message I get with the online.swagger.io-validator:

{"messages":["attribute definitions.$ref is not of type
`object`"],"schemaValidationMessages":[{"level":"error","domain":"validation","keyword":"type","message":"instance
type (string) does not match any allowed primitive type (allowed:
[\"object\"])","schema":{"loadingURI":"http://swagger.io/v2/schema.json#","pointer":"/definitions/schema"},"instance":{"pointer":"/definitions/$ref"}}]}

An option would be to keep the proposed structure for development, and use the
minifySwagger.pl-script (Bug 16212) to have a valid Swagger specification in
the minified swagger.min.json.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to