-
Notifications
You must be signed in to change notification settings - Fork 30
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
Parsing xml files with OpenApi-Parser returns NPE #170
Comments
@Richter-cg Thanks. Can you explain what you mean by "any XML input..."? XML is not a supported representation for Swagger models in any scenario, to my knowledge. The KaiZen parser certainly cannot handle XML. |
In our project, we have different input formats and the only way to find out wich parser we need is trial and error. So at one point we run into the problem that the KaiZen parser tries to parse XML. We expected that the KaiZen would reject the XML but it tries to parse it and then returns the NPE from above. So does the KaiZen parser support an input format check or produces an error log which could help us? |
I figured out that our NPE is triggered by tabs within the input file. By replacing the tabs with whitespaces, i receive an SwaggerParserException which is what i was looking for. If the tab intolerance is a unknown issue for you (i did not figured that out), you can reproduce it by replacing spaces with tabs in your test files. For example in parseTest.yaml and then run the BigParseTest. |
Thanks @Richter-cg for the additional info. I expect to be able to look into this shortly. |
In our project, a test tries out different parser for our input files. In the case of any XML input in combination with the OpenApi-Parser, we recieve
Caused by: java.lang.NullPointerException at com.reprezen.kaizen.oasparser.ovl3.OpenApi3Impl.getInfo (OpenApi3Impl.java:169)
.Some kind of input format check or a more detailed exception could help us a lot.
The text was updated successfully, but these errors were encountered: