set disallowAdditionalPropertiesIfNotPresent to false as default

This commit is contained in:
William Cheng 2023-09-13 11:24:31 +08:00
parent 4260c7aaf0
commit 587d4b0679
6 changed files with 6 additions and 6 deletions

View File

@ -233,7 +233,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
ImmutableMap.Builder<String, String> frameworkBuilder = new ImmutableMap.Builder<>();
for (FrameworkStrategy frameworkStrategy : frameworkStrategies) {

View File

@ -194,7 +194,7 @@ public class CSharpReducedClientCodegen extends AbstractCSharpCodegen {
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
ImmutableMap.Builder<String, String> frameworkBuilder = new ImmutableMap.Builder<>();
for (FrameworkStrategy frameworkStrategy : frameworkStrategies) {

View File

@ -136,7 +136,7 @@ public class GoClientCodegen extends AbstractGoCodegen {
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
}
/**

View File

@ -568,7 +568,7 @@ public class PowerShellClientCodegen extends DefaultCodegen implements CodegenCo
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
// default value in the template
additionalProperties.put("powershellVersion", "6.2"); // minimal PS version

View File

@ -184,7 +184,7 @@ public class PythonClientCodegen extends AbstractPythonCodegen implements Codege
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
}
@Override

View File

@ -233,7 +233,7 @@ public class RClientCodegen extends DefaultCodegen implements CodegenConfig {
"Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.");
disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
this.setDisallowAdditionalPropertiesIfNotPresent(true);
this.setDisallowAdditionalPropertiesIfNotPresent(false);
}