Is your feature request related to a problem? Please describe.
When schema validation takes place for a union type, the end result is an error object with a single message of Invalid input, which strips a lot of useful information out of the validation flow.
Describe the solution you'd like
Some method of specifying (or preferably a breaking change that would make this behavior default) to essentially flatten the errors into a root object like any other validation result.
Describe alternatives you've considered
Trying to refactor my schema to prevent a union from being necessary, which I don't think is possible...
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe. When schema validation takes place for a union type, the end result is an error object with a single
message
ofInvalid input
, which strips a lot of useful information out of the validation flow.Describe the solution you'd like Some method of specifying (or preferably a breaking change that would make this behavior default) to essentially flatten the errors into a root object like any other validation result.
Describe alternatives you've considered Trying to refactor my schema to prevent a union from being necessary, which I don't think is possible...
Additional context Add any other context or screenshots about the feature request here.