forked from loafle/openapi-generator-original
Merge pull request #1628 from wing328/csharp_optional_parameter
[C#] add optional parameter to c# API client
This commit is contained in:
@@ -27,6 +27,8 @@ public class CSharpClientOptionsTest extends AbstractOptionsTest {
|
||||
new Expectations(clientCodegen) {{
|
||||
clientCodegen.setPackageName(CSharpClientOptionsProvider.PACKAGE_NAME_VALUE);
|
||||
times = 1;
|
||||
clientCodegen.setOptionalMethodArgumentFlag(true);
|
||||
times = 1;
|
||||
clientCodegen.setPackageVersion(CSharpClientOptionsProvider.PACKAGE_VERSION_VALUE);
|
||||
times = 1;
|
||||
}};
|
||||
|
||||
@@ -21,6 +21,7 @@ public class CSharpClientOptionsProvider implements OptionsProvider {
|
||||
return builder.put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE)
|
||||
.put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE)
|
||||
.put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, "true")
|
||||
.put(CodegenConstants.OPTIONAL_METHOD_ARGUMENT, "true")
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user