fix the useage of the cli option for emitdefaultvalues and verify that it works

This commit is contained in:
Tommy Alander
2016-03-03 10:27:42 +01:00
parent e23626b05c
commit 033b9871b3
3 changed files with 11 additions and 1 deletions

View File

@@ -121,6 +121,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
this.returnICollection = returnICollection;
}
public void setOptionalEmitDefaultValue(boolean optionalEmitDefaultValue) {
this.optionalEmitDefaultValue = optionalEmitDefaultValue;
}
public void setUseCollection(boolean useCollection) {
this.useCollection = useCollection;
if (useCollection) {
@@ -192,6 +196,10 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
if (additionalProperties.containsKey(CodegenConstants.RETURN_ICOLLECTION)) {
setReturnICollection(Boolean.valueOf(additionalProperties.get(CodegenConstants.RETURN_ICOLLECTION).toString()));
}
if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES)) {
setOptionalEmitDefaultValue(Boolean.valueOf(additionalProperties.get(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES).toString()));
}
}
@Override