forked from loafle/openapi-generator-original
[java] fix optional array property's default value (#14961)
* fix optional array property default value * fix default values * more fixes * update default value for jersey2, 3, okhttp-gson * update default value * fix java okhttp-gson * fix jersey2, 3
This commit is contained in:
@@ -43,7 +43,7 @@ public class Pet {
|
||||
|
||||
@JsonProperty("tags")
|
||||
@Valid
|
||||
private List<@Valid Tag> tags = null;
|
||||
private List<@Valid Tag> tags;
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@@ -165,6 +165,9 @@ public class Pet {
|
||||
}
|
||||
|
||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||
if (this.photoUrls == null) {
|
||||
this.photoUrls = new ArrayList<>();
|
||||
}
|
||||
this.photoUrls.add(photoUrlsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user