This commit is contained in:
Tony Tam
2015-04-04 00:02:34 -07:00
parent 17ca7c4648
commit d9f8fcb7a4
2 changed files with 25 additions and 5 deletions

View File

@@ -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());