Skip to content

feat: implement Validation for error accumulation in DynamicValue #480 - #1052

Open
khozakhulile27-netizen wants to merge 16 commits into
zio:mainfrom
khozakhulile27-netizen:main
Open

feat: implement Validation for error accumulation in DynamicValue #480#1052
khozakhulile27-netizen wants to merge 16 commits into
zio:mainfrom
khozakhulile27-netizen:main

Conversation

@khozakhulile27-netizen

Copy link
Copy Markdown

Summary

This PR implements Validation for error accumulation in DynamicValue, addressing the requirements in issue #480.

Changes

  • Updated DynamicValue.scala to support error accumulation during validation.
  • Updated build.properties to ensure project consistency.

Related Issue

Closes #480

@CLAassistant

CLAassistant commented Mar 22, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


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.

@khozakhulile27-netizen

This comment was marked as spam.

@khozakhulile27-netizen khozakhulile27-netizen left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resume reviews

@khozakhulile27-netizen

This comment was marked as spam.

1 similar comment
@khozakhulile27-netizen

This comment was marked as spam.

@khozakhulile27-netizen khozakhulile27-netizen left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

​"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."

@khozakhulile27-netizen khozakhulile27-netizen left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/attempt #480

@khozakhulile27-netizen

This comment was marked as spam.

@khozakhulile27-netizen

This comment was marked as spam.

@khozakhulile27-netizen khozakhulile27-netizen left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please review

@khozakhulile27-netizen khozakhulile27-netizen left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

@khozakhulile27-netizen

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve DynamicValue error handling

2 participants