We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88c0804 commit e793f35Copy full SHA for e793f35
src/main/java/io/swagger/codegen/v3/generators/DefaultCodegenConfig.java
@@ -3770,7 +3770,9 @@ protected Schema getSchemaFromResponse(ApiResponse response) {
3770
Schema schema = null;
3771
for (String contentType : response.getContent().keySet()) {
3772
schema = response.getContent().get(contentType).getSchema();
3773
- schema.addExtension("x-content-type", contentType);
+ if (schema != null) {
3774
+ schema.addExtension("x-content-type", contentType);
3775
+ }
3776
break;
3777
}
3778
return schema;
0 commit comments