Skip to content

Commit 70b0120

Browse files
committed
change default value of disallowAdditionalPropertiesIfNotPresent
1 parent 65c3126 commit 70b0120

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenConstants.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,8 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case,
408408

409409
public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "disallowAdditionalPropertiesIfNotPresent";
410410
public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC =
411-
"If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. " +
412-
"If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.";
411+
"If false (default), the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. " +
412+
"If true, keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.";
413413

414414
public static final String UNSUPPORTED_V310_SPEC_MSG =
415415
"OpenAPI 3.1 support is still in beta. To report an issue related to 3.1 spec, please kindly open an issue in the Github repo: https://github.com/openAPITools/openapi-generator.";

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultCodegen.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,7 +1792,7 @@ public DefaultCodegen() {
17921792
// option to change how we process + set the data in the 'additionalProperties' keyword.
17931793
CliOption disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean(
17941794
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
1795-
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
1795+
CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.FALSE.toString());
17961796
Map<String, String> disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
17971797
disallowAdditionalPropertiesIfNotPresentOpts.put("false",
17981798
"The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");

0 commit comments

Comments
 (0)