-
Notifications
You must be signed in to change notification settings - Fork 531
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
Malformed Spec Causes NPE #1685
Comments
Hi @ricekot thanks for reporting this issue, we have added a pr with a test and the fix. Please reopen if this keep happening. |
It seems that the NPE is resolved, but the error is still not reported. The spec I provided above is deliberately malformed, and the SwaggerParserResult object should contain the following (or similar) error message:
This is printed to the output but not returned in the error messages list. |
improve test for issue #1685 get messages from conversion v2 to v3
@ricekot please check, I have added a solution for the messages don't get lost in the process of conversion. |
Yes, thank you, this issue is resolved now. |
Parsing the following spec:
results in an NPE instead of returning a list of errors.
This may be happening because
out.getOpenAPI()
is nullable at:swagger-parser/modules/swagger-parser-v2-converter/src/main/java/io/swagger/v3/parser/converter/SwaggerConverter.java
Line 114 in 1670890
Stack trace:
The text was updated successfully, but these errors were encountered: