Skip to content

Commit e9791b3

Browse files
committed
default nested array to null in java generators
1 parent 5b8a115 commit e9791b3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,6 +1291,9 @@ public String toArrayDefaultValue(CodegenProperty cp, Schema schema) {
12911291
}
12921292
})
12931293
.collect(Collectors.joining(", "));
1294+
} else if (cp.items.isContainer) {
1295+
// TODO nested array/set/map is not supported at the moment so defaulting to null
1296+
defaultValue = null;
12941297
} else { // array item is non-string, e.g. integer
12951298
defaultValue = StringUtils.join(_values, ", ");
12961299
}

0 commit comments

Comments
 (0)