Skip to content

Commit

Permalink
fixed NPE on adding content type extension
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMario committed Mar 15, 2019
1 parent 88c0804 commit e793f35
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3770,7 +3770,9 @@ protected Schema getSchemaFromResponse(ApiResponse response) {
Schema schema = null;
for (String contentType : response.getContent().keySet()) {
schema = response.getContent().get(contentType).getSchema();
schema.addExtension("x-content-type", contentType);
if (schema != null) {
schema.addExtension("x-content-type", contentType);
}
break;
}
return schema;
Expand Down

0 comments on commit e793f35

Please # to comment.