mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 00:27:04 +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:
@@ -99,7 +99,7 @@ public class DefaultValue {
|
||||
|
||||
public static final String SERIALIZED_NAME_ARRAY_STRING = "array_string";
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_STRING)
|
||||
private List<String> arrayString;
|
||||
private List<String> arrayString = new ArrayList<>();
|
||||
|
||||
public static final String SERIALIZED_NAME_ARRAY_STRING_NULLABLE = "array_string_nullable";
|
||||
@SerializedName(SERIALIZED_NAME_ARRAY_STRING_NULLABLE)
|
||||
|
||||
@@ -50,7 +50,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
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {
|
||||
public static final String SERIALIZED_NAME_VALUES = "values";
|
||||
@SerializedName(SERIALIZED_NAME_VALUES)
|
||||
private List<String> values;
|
||||
private List<String> values = new ArrayList<>();
|
||||
|
||||
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user