Skip to content

Commit 700616a

Browse files
committed
add a CLI option
1 parent 7cff6fa commit 700616a

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -451,4 +451,6 @@ public static enum ENUM_PROPERTY_NAMING_TYPE {camelCase, PascalCase, snake_case,
451451
public static final String MAX_ATTEMPTS_FOR_RETRY = "maxAttemptsForRetry";
452452

453453
public static final String WAIT_TIME_OF_THREAD = "waitTimeMillis";
454+
455+
public static final String USE_DEFAULT_VALUES_FOR_REQUIRED_VARS = "useDefaultValuesForRequiredVars";
454456
}

modules/openapi-generator/src/test/java/org/openapitools/codegen/options/GoClientOptionsProvider.java

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public Map<String, String> createOptions() {
6565
.put(CodegenConstants.GENERATE_UNMARSHAL_JSON, "true")
6666
.put("generateInterfaces", "true")
6767
.put("structPrefix", "true")
68+
.put(CodegenConstants.USE_DEFAULT_VALUES_FOR_REQUIRED_VARS, "true")
6869
.build();
6970
}
7071

0 commit comments

Comments
 (0)