Update toJson() method creation for integer type in CdpClientGenerator.
@@ -769,6 +769,9 @@ public String getJavaDefaultValue() {
if (type.equals("object")) {
toJson.setType("java.util.Map<String, Object>");
toJson.getBody().get().addStatement(String.format("return %s;", propertyName));
+ } else if (type.equals("integer")) {
+ toJson.setType(Integer.class);
+ toJson.getBody().get().addStatement(String.format("return %s;", propertyName));
} else {
toJson.setType(String.class);
toJson.getBody().get().addStatement(String.format("return %s.toString();", propertyName));
