diff --git a/src/main/java/io/swagger/codegen/v3/generators/SchemaHandler.java b/src/main/java/io/swagger/codegen/v3/generators/SchemaHandler.java index e9cf7638be..26948b52ad 100644 --- a/src/main/java/io/swagger/codegen/v3/generators/SchemaHandler.java +++ b/src/main/java/io/swagger/codegen/v3/generators/SchemaHandler.java @@ -124,6 +124,9 @@ protected CodegenModel processArrayItemSchema(CodegenModel codegenModel, ArraySc final Schema itemsSchema = arraySchema.getItems(); if (itemsSchema instanceof ComposedSchema) { final CodegenModel composedModel = this.processComposedSchema(codegenModel.name + ARRAY_ITEMS_SUFFIX, (ComposedSchema) itemsSchema, allModels); + if (composedModel == null) { + return null; + } this.updateArrayModel(codegenModel, composedModel.name, arraySchema); return composedModel; }