mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-03-10 08:31:23 +00:00
better null check in array default value (java) (#16503)
This commit is contained in:
@@ -1349,8 +1349,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
if (example == null) {
|
||||
example = "null";
|
||||
} else if (Boolean.TRUE.equals(p.isArray)) {
|
||||
|
||||
if (p.items.defaultValue != null) {
|
||||
if (p.items != null && p.items.defaultValue != null) {
|
||||
String innerExample;
|
||||
if ("String".equals(p.items.dataType)) {
|
||||
innerExample = "\"" + p.items.defaultValue + "\"";
|
||||
|
||||
Reference in New Issue
Block a user