<#3659 feat(targets): Report all record validation...
# meltano-repo-activity
g
#3659 feat(targets): Report all record validation errors instead of only the first Pull request opened by Lemonnycodes What
JSONSchemaValidator.validate()
used
validate()
, which raises on the first schema error only. This switches to
iter_errors()
so every violation in a record is collected and reported together in a single
InvalidRecord
. Why Closes #2516. When a record breaks the schema in multiple places, users currently have to fix-and-rerun repeatedly to discover each error. Aggregating them is much friendlier for debugging targets. How • Replace the single
validate()
call with
sorted(iter_errors(...))
and join the messages. • Errors are sorted for deterministic output. • Added
test_jsonschema_validator_reports_all_errors
covering a record with three independent violations. Summary by Sourcery Aggregate all JSON schema validation errors for a record instead of stopping at the first failure. Bug Fixes: • Ensure record validation raises an InvalidRecord containing all schema violations found in the record, rather than only the first error. Tests: • Add a test verifying that JSONSchemaValidator surfaces all field-level schema errors in a single InvalidRecord, including preserving the original record. meltano/sdk