You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{"schemaValidationMessages":[{"level":"error","domain":"validation","keyword":"oneOf","message":"instance failed to match exactly one schema (matched 0 out of 6)","schema":{"loadingURI":"http://swagger.io/v2/schema.json#","pointer":"/definitions/securityDefinitions/additionalProperties"},"instance":{"pointer":"/securityDefinitions/oauth2AccessCodeSecurity"}},{"level":"error","domain":"validation","keyword":"oneOf","message":"instance failed to match exactly one schema (matched 0 out of 6)","schema":{"loadingURI":"http://swagger.io/v2/schema.json#","pointer":"/definitions/securityDefinitions/additionalProperties"},"instance":{"pointer":"/securityDefinitions/oauth2ApplicationSecurity"}},{"level":"error","domain":"validation","keyword":"oneOf","message":"instance failed to match exactly one schema (matched 0 out of 6)","schema":{"loadingURI":"http://swagger.io/v2/schema.json#","pointer":"/definitions/securityDefinitions/additionalProperties"},"instance":{"pointer":"/securityDefinitions/oauth2ImplicitSecurity"}},{"level":"error","domain":"validation","keyword":"oneOf","message":"instance failed to match exactly one schema (matched 0 out of 6)","schema":{"loadingURI":"http://swagger.io/v2/schema.json#","pointer":"/definitions/securityDefinitions/additionalProperties"},"instance":{"pointer":"/securityDefinitions/oauth2PasswordSecurity"}}]}
Haven't tested it, but I would guess that it's because your URLs (or rather URIs) are invalid URLs (due to the curly braces). If you can test easily, try removing them and see if it resolves the issue. Otherwise, I could get around to testing it a bit later.
deefactorial
changed the title
Valid swagger.json produces validation errors
swagger ui validation errors with security definitions
Jan 29, 2016
Okay, just tested it, and that's indeed the issue. The URLs for oauth2 definitions do not allow templating/parameter substitution like regular paths. You could escape the curly braces, but it would still not provide you with what you hope - templated URLs.
I posted this issue on swagger-tools:
apigee-127/swagger-tools#329
When I run the swagger-tools UI and I browse to the /docs There is an ERROR at the bottom of the page,
When I click on it brings me to:
https://online.swagger.io/validator/debug?url=https://cloud.openmoney.cc/api-docs
The errors I'm getting are:
My swagger.json file has no errors on http://editor.swagger.io/
The text was updated successfully, but these errors were encountered: