forked from loafle/openapi-generator-original
fix the useage of the cli option for emitdefaultvalues and verify that it works
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user