jakartaee / jakartaee/validation
Provide access to unwrapped value for `ConstraintViolation` on container method argument or return value
- Dominant language
- Java
- Stars
- 163
- Forks
- 67
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 2
Description
For method validation on arguments or return values that are containers, it would be useful to have access to the unwrapped value. For lists, arrays, and maps it is possible to get the `containerIndex` or `containerKey` from the next `Path.Node` and use that to get the value, but there is nothing for `Iterable` and other containers.
`ConstraintViolation` exposes part of the object graph through `rootBean` and `leafBean`. Perhaps `Path.Node` could provide access to the unwrapped value associated with that part of the property path, but there may be other ways.
Contributor guide
Research direction
Start by reviewing the ConstraintViolation and Path.Node APIs described in the issue, especially how container method arguments and return values are represented. Determine how unwrapped values could be exposed for Iterable and other containers, while considering the existing containerIndex and containerKey behavior. Done means the API approach and its expected behavior are clearly defined for these container cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100