[4947][java]: adds support for validation of primitives in arrays (#17165)

* [4947][java]: adds support for validation of primitives in arrays

* [4947][java]: prevents generation '@Valid' for Object

* [4947][java]: test against different codegens and stick to primitive

* [4947][java]: code review

* [4947][java]: enhance getBeanValidation

* [4947][java]: adds email

* [4947][java]: removes unnecessary override

* [4947][java]: adds postProcessResponseWithProperty

* [4947][java]: adds missing import {{javaxPackage}}.validation.Valid

* [4947][java]: adds missing useBeanValidation

* [4947][java]: fix use rootJavaEEPackage for helidon
This commit is contained in:
Aliaksei
2023-12-11 13:55:38 +01:00
committed by GitHub
parent d4d5196907
commit 809b3331a9
575 changed files with 1982 additions and 843 deletions

View File

@@ -5,6 +5,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* A category for a pet
*/

View File

@@ -6,6 +6,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* Describes the result of uploading an image resource
*/

View File

@@ -6,6 +6,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* An order for a pets from the pet store
*/

View File

@@ -10,6 +10,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* A pet for sale in the pet store
*/
@@ -38,7 +39,7 @@ public class Pet {
@JsonProperty("tags")
@Valid
private List<Tag> tags = null;
private List<@Valid Tag> tags = null;
/**
* pet status in the store
@@ -153,7 +154,7 @@ public class Pet {
this.photoUrls = photoUrls;
}
public Pet tags(List<Tag> tags) {
public Pet tags(List<@Valid Tag> tags) {
this.tags = tags;
return this;
}
@@ -170,11 +171,11 @@ public class Pet {
* Get tags
* @return tags
**/
public List<Tag> getTags() {
public List<@Valid Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
public void setTags(List<@Valid Tag> tags) {
this.tags = tags;
}

View File

@@ -5,6 +5,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* A tag for a pet
*/

View File

@@ -5,6 +5,7 @@ import java.util.Set;
import javax.validation.*;
import java.util.Objects;
import javax.validation.constraints.*;
import javax.validation.Valid;
/**
* A User who is purchasing from the pet store
*/