Add single quotes around default string values

This commit is contained in:
delenius 2016-02-18 19:42:40 -08:00
parent 84b4af7bfb
commit 5e7dc29b1a

View File

@ -337,7 +337,7 @@ public class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo
if (p instanceof StringProperty) { if (p instanceof StringProperty) {
StringProperty dp = (StringProperty) p; StringProperty dp = (StringProperty) p;
if (dp.getDefault() != null) { if (dp.getDefault() != null) {
return dp.getDefault(); return "'" + dp.getDefault() + "'";
} }
} else if (p instanceof BooleanProperty) { } else if (p instanceof BooleanProperty) {
BooleanProperty dp = (BooleanProperty) p; BooleanProperty dp = (BooleanProperty) p;