[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:
William Cheng
2023-03-17 10:16:17 +08:00
committed by GitHub
parent e626b43e27
commit d0f7bd18ba
669 changed files with 8763 additions and 40246 deletions

View File

@@ -55,7 +55,7 @@ public class Pet {
@JsonProperty("tags")
@JacksonXmlProperty(localName = "tag")
@Valid
private List<@Valid Tag> tags = null;
private List<@Valid Tag> tags = new ArrayList<>();
/**
* pet status in the store
@@ -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;
}