Commit eef07a8
JuuZoop
Added an additional null check to prevent java.lang.NullPointerException on certain OpenAPI3 yaml files that have success responses but no response content.
"java.lang.NullPointerException: Cannot invoke "io.swagger.v3.oas.models.media.Content.entrySet()" because the return value of "io.swagger.v3.oas.models.responses.ApiResponse.getContent()" is null
at org.apiaddicts.apitools.openapi2soapui.model.SoapUIProject.setRequestMediaType(SoapUIProject.java:596) ~[classes/:na]"
For example converting a following valid petstore yaml would result to a null pointer exception error without this fix: https://github.com/OAI/OpenAPI-Specification/blob/main/examples/v3.0/petstore.yaml1 parent b62a5a4 commit eef07a8
File tree
1 file changed
+1
-1
lines changed- src/main/java/org/apiaddicts/apitools/openapi2soapui/model
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
596 | | - | |
| 596 | + | |
597 | 597 | | |
598 | 598 | | |
599 | 599 | | |
| |||
0 commit comments