Fix NullPointerException when resolving an ApiResponse with no content
@@ -159,10 +159,12 @@ public class ResolverCache {
protected <T> void updateLocalRefs(String file, T result) {
if(result instanceof ApiResponse) {
ApiResponse response = (ApiResponse) result;
+ if (response.getContent() != null) {
for (String mediaType : response.getContent().keySet()) {
updateLocalRefs(file, response.getContent().get(mediaType).getSchema());
}
}
+ }
if(result instanceof Schema && ((Schema)(result)).get$ref() != null) {
Schema prop = (Schema) result;
updateLocalRefs(file, prop);
