swagger-api / swagger-parser

Swagger Spec to Java POJOs
http://swagger.io
Apache License 2.0
780 stars 526 forks source link

NullPointerExceptionNPE in OpenAPIV3Parser.read(String, List<AuthorizationValue>, ParseOptions) #2046

Closed garydgregory closed 8 months ago

garydgregory commented 8 months ago

Issue: https://github.com/swagger-api/swagger-parser/issues/2046 PR: https://github.com/swagger-api/swagger-parser/pull/2047

java.lang.NullPointerException: Cannot invoke "java.util.List.iterator()" because the return value of "io.swagger.v3.parser.core.models.SwaggerParseResult.getMessages()" is null
    at io.swagger.v3.parser.OpenAPIV3Parser.read(OpenAPIV3Parser.java:125)
    at ...
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)