Problem
InputQuery currently stops at the first invalid input parameter. For example, if both $x and $y are invalid, resolving $x throws immediately and $y is never inspected.
API consumers often need a complete validation response so they can fix all submitted fields in one round trip.
Desired behavior
Collect independent user-input validation failures across #[Input] parameters and DTO constructor parameters, then throw one aggregate exception containing all violations.
Each violation should carry structured data such as:
- parameter/path name, e.g.
x, y, tagIds
- expected shape/type
- actual shape/type
- human-readable message
Initial scope
Aggregate only input-shape failures that are safe to continue after:
- missing required input
array parameter receiving a non-array value
#[Input(item: ...)] array receiving a non-array value
- array item expected to be an object array but receiving scalar
Do not aggregate programming/configuration errors:
- DI unbound dependencies
- invalid attribute combinations
- unknown classes
- file upload attribute misuse
BEAR.Resource coordination
BEAR.Resource should be able to translate the aggregate input exception into a 400-class ParameterException response while preserving the per-field violation list for handlers/renderers.
Out of scope for first pass
- JSON Schema error aggregation
- scalar coercion policy changes
- parsing strings like
tagIds=1,2,3 into arrays
Problem
InputQuerycurrently stops at the first invalid input parameter. For example, if both$xand$yare invalid, resolving$xthrows immediately and$yis never inspected.API consumers often need a complete validation response so they can fix all submitted fields in one round trip.
Desired behavior
Collect independent user-input validation failures across
#[Input]parameters and DTO constructor parameters, then throw one aggregate exception containing all violations.Each violation should carry structured data such as:
x,y,tagIdsInitial scope
Aggregate only input-shape failures that are safe to continue after:
arrayparameter receiving a non-array value#[Input(item: ...)] arrayreceiving a non-array valueDo not aggregate programming/configuration errors:
BEAR.Resource coordination
BEAR.Resourceshould be able to translate the aggregate input exception into a 400-classParameterExceptionresponse while preserving the per-field violation list for handlers/renderers.Out of scope for first pass
tagIds=1,2,3into arrays