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
{{ message }}
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Hi! It seems I might have been using the OpenAPI spec the wrong way - putting definitions field in schemas which is not supported by the spec. However, I haven't got any errors using swagger-cli validate due to the issue I describe below.
Swagger schema validation failed.
Data does not match any schemas from 'oneOf' at #/paths//route/get/requestBody
Data does not match any schemas from 'oneOf' at #/paths//route/get/requestBody/content/application/json/schema
Additional properties not allowed: definitions at #/content/application/json/schema
Missing required property: $ref at #/content/application/json/schema
Missing required property: $ref at #/paths//route/get/requestBody
JSON_OBJECT_VALIDATION_FAILED
While I have found some info that OpenAPI doesn't forbid circular references, this seems to be an error, because the definitions field should not be accepted at all.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi! It seems I might have been using the OpenAPI spec the wrong way - putting
definitions
field in schemas which is not supported by the spec. However, I haven't got any errors usingswagger-cli validate
due to the issue I describe below.Assume the main spec is:
Then there are 3 scenarios depending on the contents of
schema.yaml
.1. WORKS
2. FAILS
The error message is
3. WORKS
While I have found some info that OpenAPI doesn't forbid circular references, this seems to be an error, because the
definitions
field should not be accepted at all.The text was updated successfully, but these errors were encountered: