-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected validation error on consumes/produces with external references #22
Comments
I can help with it. Because unfortunately, @oyeli doesn't have enough time. @giuliopulina I have two approaches on how to deal with it:
What do you think about it? |
Hi @kh0ma, thanks for helping :) What do you think about it? |
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:
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
The text was updated successfully, but these errors were encountered: