diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenProperty.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenProperty.java index b40aca50538b..0091204a0abb 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenProperty.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenProperty.java @@ -33,7 +33,7 @@ public class CodegenProperty { public Boolean exclusiveMaximum; public Boolean hasMore, required, secondaryParam; public Boolean isPrimitiveType, isContainer, isNotContainer; - public Boolean isString, isInteger, isLong, isFloat, isDouble, isByte, isBinary, isBoolean, isDate, isDateTime; + public Boolean isString, isInteger, isLong, isFloat, isDouble, isByteArray, isBinary, isBoolean, isDate, isDateTime; public Boolean isListContainer, isMapContainer; public boolean isEnum; public Boolean isReadOnly = false; @@ -88,7 +88,7 @@ public class CodegenProperty { result = prime * result + ((isLong == null) ? 0 : isLong.hashCode()); result = prime * result + ((isFloat == null) ? 0 : isFloat.hashCode()); result = prime * result + ((isDouble == null) ? 0 : isDouble.hashCode()); - result = prime * result + ((isByte == null) ? 0 : isByte.hashCode()); + result = prime * result + ((isByteArray == null) ? 0 : isByteArray.hashCode()); result = prime * result + ((isBinary == null) ? 0 : isBinary.hashCode()); result = prime * result + ((isBoolean == null) ? 0 : isBoolean.hashCode()); result = prime * result + ((isDate == null) ? 0 : isDate.hashCode()); @@ -218,7 +218,7 @@ public class CodegenProperty { if (this.isDouble != other.isDouble && (this.isDouble == null || !this.isDouble.equals(other.isDouble))) { return false; } - if (this.isByte != other.isByte && (this.isByte == null || !this.isByte.equals(other.isByte))) { + if (this.isByteArray != other.isByteArray && (this.isByteArray == null || !this.isByteArray.equals(other.isByteArray))) { return false; } if (this.isBoolean != other.isBoolean && (this.isBoolean == null || !this.isBoolean.equals(other.isBoolean))) { 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 35b1cbe650a3..9345cf5a8cb3 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 @@ -1069,6 +1069,18 @@ public class DefaultCodegen { } } + if (p instanceof BooleanProperty) { + property.isBoolean = true; + } + + if (p instanceof BinaryProperty) { + property.isBinary = true; + } + + if (p instanceof ByteArrayProperty) { + property.isByteArray = true; + } + if (p instanceof DoubleProperty) { DoubleProperty sp = (DoubleProperty) p; property.isDouble = true;