feat: implement Validation for error accumulation in DynamicValue #480 - #1052
feat: implement Validation for error accumulation in DynamicValue #480#1052khozakhulile27-netizen wants to merge 16 commits into
Conversation
|
Khulilekhoza27-netizen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
This comment was marked as spam.
This comment was marked as spam.
khozakhulile27-netizen
left a comment
There was a problem hiding this comment.
Resume reviews
This comment was marked as spam.
This comment was marked as spam.
1 similar comment
This comment was marked as spam.
This comment was marked as spam.
khozakhulile27-netizen
left a comment
There was a problem hiding this comment.
"I have refactored toTypedValue and toTypedValueLazyError to use zio.prelude.Validation instead of Either.
Key changes:
Imported zio.prelude.Validation to support accumulated error reporting.
Updated method signatures: Changed return types from Either[DecodeError, A] to Validation[DecodeError, A].
Enhanced Record Decoding: Implemented validateAll when decoding DynamicValue.Record. This now recursively calls toTypedValueLazyError for each field and accumulates errors (like Missing field) rather than failing fast on the first error.
Primitive Mapping: Updated primitive cases to use validation.succeed for successful values.
This change allows users of the schema to see all validation errors at once rather than fixing them one by one."
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
…ate-readme Update README.md
Summary
This PR implements Validation for error accumulation in
DynamicValue, addressing the requirements in issue #480.Changes
DynamicValue.scalato support error accumulation during validation.build.propertiesto ensure project consistency.Related Issue
Closes #480