mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
[Java] fix default value for JsonNullable (#14703)
* fix java webclient default value * update default value in java okhttp client * fix java native client default value in JsonNullable * improve java okhttp-gson default value template * update java rest-related templates * update feign samples * update jersey3 templates * update jersey2 templates * update default value in jaxrs templates * fix spring default value * update jaxrs pojo, fix tests * update samples * suport set
This commit is contained in:
@@ -282,7 +282,7 @@ public class DefaultValue {
|
||||
|
||||
public DefaultValue addArrayStringNullableItem(String arrayStringNullableItem) {
|
||||
if (this.arrayStringNullable == null || !this.arrayStringNullable.isPresent()) {
|
||||
this.arrayStringNullable = JsonNullable.<List<String>>of(null);
|
||||
this.arrayStringNullable = JsonNullable.<List<String>>of(new ArrayList<>());
|
||||
}
|
||||
try {
|
||||
this.arrayStringNullable.get().add(arrayStringNullableItem);
|
||||
|
||||
Reference in New Issue
Block a user