diff --git a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java
index 8a5d359e2ee9..c8e0ad452830 100644
--- a/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java
+++ b/modules/swagger-codegen/src/main/java/com/wordnik/swagger/codegen/DefaultCodegen.java
@@ -312,14 +312,34 @@ public class DefaultCodegen {
return "null";
else if(p instanceof DateTimeProperty)
return "null";
- else if (p instanceof DoubleProperty)
+ else if (p instanceof DoubleProperty) {
+ DoubleProperty dp = (DoubleProperty) p;
+ if(dp.getDefault() != null) {
+ return dp.getDefault().toString();
+ }
return "null";
- else if (p instanceof FloatProperty)
+ }
+ else if (p instanceof FloatProperty) {
+ FloatProperty dp = (FloatProperty) p;
+ if(dp.getDefault() != null) {
+ return dp.getDefault().toString();
+ }
return "null";
- else if (p instanceof IntegerProperty)
+ }
+ else if (p instanceof IntegerProperty) {
+ IntegerProperty dp = (IntegerProperty) p;
+ if(dp.getDefault() != null) {
+ return dp.getDefault().toString();
+ }
return "null";
- else if (p instanceof LongProperty)
+ }
+ else if (p instanceof LongProperty) {
+ LongProperty dp = (LongProperty) p;
+ if(dp.getDefault() != null) {
+ return dp.getDefault().toString();
+ }
return "null";
+ }
else if (p instanceof MapProperty) {
MapProperty ap = (MapProperty) p;
String inner = getSwaggerType(ap.getAdditionalProperties());
diff --git a/pom.xml b/pom.xml
index 32dca5808c07..1a0f176c8f0a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -427,7 +427,7 @@
1.0.5-SNAPSHOT
2.10.4
2.3.4
- 1.5.0-M2
+ 1.5.1-M2-SNAPSHOT
2.1.4
2.3
1.2