diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/InlineModelResolver.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/InlineModelResolver.java index d7c2b2355e..34b0906fd1 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/InlineModelResolver.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/InlineModelResolver.java @@ -182,8 +182,10 @@ public class InlineModelResolver { } } else if (model instanceof ComposedModel) { ComposedModel m = (ComposedModel) model; - Map properties = m.getChild().getProperties(); - flattenProperties(properties, modelName); + if (m.getChild() != null) { + Map properties = m.getChild().getProperties(); + flattenProperties(properties, modelName); + } } } }