Skip to content

Added an additional null check to prevent java.lang.NullPointerExcept… #2

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JuuZoop
Copy link

@JuuZoop JuuZoop commented Aug 23, 2022

…ion 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.yaml

…ion 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.yaml
YOU54F referenced this pull request in YOU54F/openapi2soapui Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant