forked from loafle/openapi-generator-original
[spring] fix default value for nullable containers (#14959)
* fix default value, update spec to 3.0 * add tests for container default value * update java camel samples * remove samples/openapi3/server/petstore/springboot-beanvalidation-no-nullable * remove ./bin/configs/spring-boot-beanvalidation-no-nullable-oas3.yaml * remove samples/openapi3/server/petstore/springboot-useoptional * remove samples/openapi3/server/petstore/springboot-reactive * update github workflow * fix default in add, put operation
This commit is contained in:
@@ -37,7 +37,7 @@ public class ObjectWithUniqueItems {
|
||||
|
||||
@JsonProperty("notNullSet")
|
||||
@Valid
|
||||
private Set<String> notNullSet = null;
|
||||
private Set<String> notNullSet = new LinkedHashSet<>();
|
||||
|
||||
@JsonProperty("nullList")
|
||||
@Valid
|
||||
@@ -45,7 +45,7 @@ public class ObjectWithUniqueItems {
|
||||
|
||||
@JsonProperty("notNullList")
|
||||
@Valid
|
||||
private List<String> notNullList = null;
|
||||
private List<String> notNullList = new ArrayList<>();
|
||||
|
||||
@JsonProperty("notNullDateField")
|
||||
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
|
||||
|
||||
Reference in New Issue
Block a user