forked from loafle/openapi-generator-original
Fix bean validation for Collection and add unit test (#14736)
* Fix bean validation for Collection + uni test * Fix * Adapt examples * Fix comments * Merge master * Remove Bean validation for Maps * Remove @Valid from jakarta * Fix example * Fix comments * Fix springboot-3 example
This commit is contained in:
@@ -98,7 +98,7 @@ public class ArrayTestDto {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayTestDto addArrayArrayOfModelItem(List<ReadOnlyFirstDto> arrayArrayOfModelItem) {
|
||||
public ArrayTestDto addArrayArrayOfModelItem(List<@Valid ReadOnlyFirstDto> arrayArrayOfModelItem) {
|
||||
if (this.arrayArrayOfModel == null) {
|
||||
this.arrayArrayOfModel = new ArrayList<>();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class FileSchemaTestClassDto {
|
||||
|
||||
@JsonProperty("files")
|
||||
@Valid
|
||||
private List<FileDto> files = null;
|
||||
private List<@Valid FileDto> files = null;
|
||||
|
||||
public FileSchemaTestClassDto file(FileDto file) {
|
||||
this.file = file;
|
||||
@@ -53,7 +53,7 @@ public class FileSchemaTestClassDto {
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
public FileSchemaTestClassDto files(List<FileDto> files) {
|
||||
public FileSchemaTestClassDto files(List<@Valid FileDto> files) {
|
||||
this.files = files;
|
||||
return this;
|
||||
}
|
||||
@@ -72,11 +72,11 @@ public class FileSchemaTestClassDto {
|
||||
*/
|
||||
@Valid
|
||||
@ApiModelProperty(value = "")
|
||||
public List<FileDto> getFiles() {
|
||||
public List<@Valid FileDto> getFiles() {
|
||||
return files;
|
||||
}
|
||||
|
||||
public void setFiles(List<FileDto> files) {
|
||||
public void setFiles(List<@Valid FileDto> files) {
|
||||
this.files = files;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class PetDto {
|
||||
|
||||
@JsonProperty("tags")
|
||||
@Valid
|
||||
private List<TagDto> tags = null;
|
||||
private List<@Valid TagDto> tags = null;
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@@ -171,7 +171,7 @@ public class PetDto {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
public PetDto tags(List<TagDto> tags) {
|
||||
public PetDto tags(List<@Valid TagDto> tags) {
|
||||
this.tags = tags;
|
||||
return this;
|
||||
}
|
||||
@@ -190,11 +190,11 @@ public class PetDto {
|
||||
*/
|
||||
@Valid
|
||||
@ApiModelProperty(value = "")
|
||||
public List<TagDto> getTags() {
|
||||
public List<@Valid TagDto> getTags() {
|
||||
return tags;
|
||||
}
|
||||
|
||||
public void setTags(List<TagDto> tags) {
|
||||
public void setTags(List<@Valid TagDto> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user