-
-
Notifications
You must be signed in to change notification settings - Fork 610
Open
Labels
Dialects v2Issues which will likely be addressed as part of reworked dialect supportIssues which will likely be addressed as part of reworked dialect supportEnhancementSome new desired functionalitySome new desired functionalityError ReportingIssues related to clearer or more robust validation error reportingIssues related to clearer or more robust validation error reporting
Description
In general, validation is lazy -- if only one error is needed (in the sense that it is known that an instance is invalid), only one is produced.
There are however (somewhat unintentional) exceptions.
E.g.:
anyOfandoneOfcalculate the.contextof the first error they yield by calculating all sub-errors that were generated. This is becauseValidationError.contextneeds to be provided on__init__.dependentRequired, on the other hand, yields many errors, one for each missing required property (see also required, additionalProperties, propertyNames, dependentRequired and any other validators that reference property *names* need a way to indicate the erroring names in ValidationErrors #119)
What's happening in these situations is that the validation function knows an error has occurred -- it wants to yield an error, but in order to do so, it needs to calculate the full details required so that the error is "complete".
We should instead have a way to indicate a validation error has occurred, but delay fully calculating its contents until/unless they are requested.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Dialects v2Issues which will likely be addressed as part of reworked dialect supportIssues which will likely be addressed as part of reworked dialect supportEnhancementSome new desired functionalitySome new desired functionalityError ReportingIssues related to clearer or more robust validation error reportingIssues related to clearer or more robust validation error reporting