From ba380c9ddaf2fb2dc81cd1a465389c9f6976bbfd Mon Sep 17 00:00:00 2001 From: Jeff Haynes Date: Mon, 13 Mar 2017 02:35:21 -0500 Subject: [PATCH] Issue 4759: Import complex type for body parameters (#4775) --- .../src/main/java/io/swagger/codegen/DefaultCodegen.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java index 463ded8077..8e9449bdfd 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java @@ -2480,6 +2480,9 @@ public class DefaultCodegen { p.isPrimitiveType = cp.isPrimitiveType; p.isBinary = isDataTypeBinary(cp.datatype); p.isFile = isDataTypeFile(cp.datatype); + if (cp.complexType != null) { + imports.add(cp.complexType); + } } // set boolean flag (e.g. isString)