-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
YAML errors on config files are shadowed by "false" JSON errors #3911
Comments
@adagios thanks for reporting and looking into this! I would probably go for |
adagios
added a commit
to adagios/swagger-core
that referenced
this issue
Apr 20, 2021
adagios
added a commit
to adagios/swagger-core
that referenced
this issue
Apr 20, 2021
I just hit this. It was a pain as I spent 20 mins trying to figure out why it was trying to read my YML file as JSON. |
frantuma
pushed a commit
to adagios/swagger-core
that referenced
this issue
Nov 2, 2022
frantuma
pushed a commit
that referenced
this issue
Nov 2, 2022
fixed in #3940 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With the
swagger-maven-plugin
, when using eitheropenapiFilePath
orconfigurationFilePath
with YAML files, if there are errors with the YAML a "false" JSON error is shown instead.Example:
In this case, the YAML parser is failing because de
description
string is unquoted and has:
characters.The problem is that only the exception of the last parser is shown.
The relevante code is in SwaggerMojo.java:
I would be happy to contribute a PR, but I am not sure what the preferred solution would be:
2.1. log them all
2.2 try to log only the one corresponding to the preferred parser
The text was updated successfully, but these errors were encountered: