mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 07:27:06 +00:00
Fix default empty collections when collection is optional (#18080)
* Fix optional empty collection as default * Fix test * Fix test
This commit is contained in:
@@ -73,7 +73,7 @@ public class Pet {
|
||||
|
||||
public static final String SERIALIZED_NAME_TAGS = "tags";
|
||||
@SerializedName(SERIALIZED_NAME_TAGS)
|
||||
private List<Tag> tags;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
|
||||
@@ -73,7 +73,7 @@ public class PetWithRequiredNullableCases2 {
|
||||
|
||||
public static final String SERIALIZED_NAME_TAGS = "tags";
|
||||
@SerializedName(SERIALIZED_NAME_TAGS)
|
||||
private List<Tag> tags;
|
||||
private List<Tag> tags = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
|
||||
Reference in New Issue
Block a user