Skip to content

Fix c# client float property default values #2397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ public String toDefaultValue(Property p) {
} else if (p instanceof FloatProperty) {
FloatProperty dp = (FloatProperty) p;
if (dp.getDefault() != null) {
return dp.getDefault().toString();
return String.format("%1$sF", dp.getDefault());
}
} else if (p instanceof IntegerProperty) {
IntegerProperty dp = (IntegerProperty) p;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ public Map<String, Object> postProcessModels(Map<String, Object> objMap) {
CodegenModel cm = (CodegenModel) mo.get("model");
for (CodegenProperty var : cm.vars) {
Map<String, Object> allowableValues = var.allowableValues;

// handle ArrayProperty
if (var.items != null) {
allowableValues = var.items.allowableValues;
}

if (allowableValues == null) {
continue;
}
Expand Down