Add Visitor to HandlerMethodValidationException

Closes gh-30813
This commit is contained in:
rstoyanchev
2023-07-04 17:19:37 +01:00
parent 2a126faae7
commit deaa493644
10 changed files with 497 additions and 36 deletions

View File

@@ -79,9 +79,10 @@ public interface MethodValidationResult {
List<ParameterValidationResult> getAllValidationResults();
/**
* Return only validation results for method parameters with errors directly
* on them. This does not include Object method parameters with nested
* errors on their fields and properties.
* Return the subset of {@link #getAllValidationResults() allValidationResults}
* that includes method parameters with validation errors directly on method
* argument values. This excludes {@link #getBeanResults() beanResults} with
* nested errors on their fields and properties.
*/
default List<ParameterValidationResult> getValueResults() {
return getAllValidationResults().stream()
@@ -90,9 +91,10 @@ public interface MethodValidationResult {
}
/**
* Return only validation results for Object method parameters with nested
* errors on their fields and properties. This excludes method parameters
* with errors directly on them.
* Return the subset of {@link #getAllValidationResults() allValidationResults}
* that includes Object method parameters with nested errors on their fields
* and properties. This excludes {@link #getValueResults() valueResults} with
* validation errors directly on method arguments.
*/
default List<ParameterErrors> getBeanResults() {
return getAllValidationResults().stream()