forked from loafle/openapi-generator-original
[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:
@@ -88,7 +88,7 @@ public interface UserApi {
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
default void createUsersWithArrayInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
|
||||
) {
|
||||
getDelegate().createUsersWithArrayInput(user);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public interface UserApi {
|
||||
@ResponseStatus(HttpStatus.OK)
|
||||
|
||||
default void createUsersWithListInput(
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<User> user
|
||||
@ApiParam(value = "List of user object", required = true) @Valid @RequestBody List<@Valid User> user
|
||||
) {
|
||||
getDelegate().createUsersWithListInput(user);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithArrayInput
|
||||
*/
|
||||
default void createUsersWithArrayInput(List<User> user) {
|
||||
default void createUsersWithArrayInput(List<@Valid User> user) {
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
|
||||
}
|
||||
@@ -59,7 +59,7 @@ public interface UserApiDelegate {
|
||||
* @return successful operation (status code 200)
|
||||
* @see UserApi#createUsersWithListInput
|
||||
*/
|
||||
default void createUsersWithListInput(List<User> user) {
|
||||
default void createUsersWithListInput(List<@Valid User> user) {
|
||||
throw new IllegalArgumentException("Not implemented");
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user