Description
Hi all,
while working on OAI/OpenAPI-Specification#21 I discovered a possible issue with consumes/produces validation.
What I'm trying to do is:
- using a valid OpenApi 2.0 spec file ('swagger-editor-external-ref-definition-imported.yml', that's the Uber API)
- Importing some definitions from above file in another spec file ('swagger-doc-external-ref-definition.yml').
I'm getting an unexpected error during validation:
[SemanticError at paths./test.get: 'produces' must be equal to 'produces: []', SemanticError at paths./test2.get: 'produces' must be equal to 'produces: []']
I'm afraid I need to change the 'imported' file to make this work, but I think it's not correct (and, often, in real life you can't really do that).
Furthermore, I came across this recent discussion about semantic validation in OpenAPI (OAI/oascomply#54) and there's no mention about consumes/produces validation (except this one: "Parameters with type of file must have a consumes of multipart/form-data or application/x-www-form-urlencoded").
Is it possible that the validation that has been introduced is too strict and not conforming to the OpenAPI 2.0 spec?
@oyeli can you maybe help on this?
You can find failing tests and test files in my branch: https://github.com/giuliopulina/swagger-validator-maven-plugin/tree/bugfix/Issue-21_external_ref_with_no_dot_not_working