Skip to content
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

Fix NullPointerException when resolving an ApiResponse with no content #852

Merged

Conversation

tjaneczko
Copy link
Contributor

This PR fixes a NullPointerException which occurs when an ApiResponse is read from an external reference which does not have any content defined.

Copy link
Contributor

@gracekarina gracekarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @tjaneczko, thanks for this PR, please add a test, so we can merge.

@tjaneczko
Copy link
Contributor Author

Will do! Thanks for the prompt review!

@tjaneczko
Copy link
Contributor Author

@gracekarina Added a test for loading an external response with no content. Also looks like the DeserializationUtils class was being completely mocked in these tests, meaning the existing testLoadExternalRefWithEscapedCharacters was never completely run, so I fixed that up and changed it to a partial mock.

Copy link
Contributor

@gracekarina gracekarina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tjaneczko

@gracekarina gracekarina merged commit 0425433 into swagger-api:2.0 Oct 3, 2018
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.

None yet

2 participants