Skip to content

Commit a485705

Browse files
sleichtStephan Leicht Vogt (C803964)
authored andcommitted
don't overwrite already existing property useOas2
1 parent 112b690 commit a485705

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/java/io/swagger/codegen/v3/DefaultGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ private void configureGeneratorProperties() {
202202
config.additionalProperties().put(CodegenConstants.GENERATE_MODEL_DOCS, generateModelDocumentation);
203203

204204
// Additional properties could be set already (f.e. using Maven plugin)
205-
if (useOas2Option != null || !config.additionalProperties().containsKey(CodegenConstants.USE_OAS2)) {
205+
if (useOas2Option != null && !config.additionalProperties().containsKey(CodegenConstants.USE_OAS2)) {
206206
config.additionalProperties().put(CodegenConstants.USE_OAS2, useOas2);
207207
}
208208

0 commit comments

Comments
 (0)