mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 16:06:09 +00:00
[java] Microprofile - fix optional array property's default value (#16500)
This commit is contained in:
committed by
GitHub
parent
616e8df8d0
commit
4418b59b47
@@ -178,6 +178,9 @@ public class Pet {
|
||||
}
|
||||
|
||||
public Pet addPhotoUrlsItem(String photoUrlsItem) {
|
||||
if (this.photoUrls == null) {
|
||||
this.photoUrls = new ArrayList<>();
|
||||
}
|
||||
this.photoUrls.add(photoUrlsItem);
|
||||
return this;
|
||||
}
|
||||
@@ -203,6 +206,9 @@ public class Pet {
|
||||
}
|
||||
|
||||
public Pet addTagsItem(Tag tagsItem) {
|
||||
if (this.tags == null) {
|
||||
this.tags = new ArrayList<>();
|
||||
}
|
||||
this.tags.add(tagsItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user