Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(next): DEVXP-2682: centralize error messages #148

Merged
merged 7 commits into from
Mar 17, 2025

Conversation

lukad
Copy link
Collaborator

@lukad lukad commented Mar 11, 2025

This PR centralizes generating error messages.

  1. message is removed from the ValidationError interface.
  2. There is a new addErrorMessages function that
  3. path in the ValidationError interface now includes the full path to a subschema when a composition keyword like e.g. anyOf is used.
    This is needed to look up a schema & value pair in addErrorMessages given a path.

@lukad lukad marked this pull request as ready for review March 17, 2025 09:02
@lukad lukad requested a review from dragidavid March 17, 2025 09:02
dragidavid
dragidavid previously approved these changes Mar 17, 2025
Copy link
Collaborator

@dragidavid dragidavid left a comment

Choose a reason for hiding this comment

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

Really like this approach. Easier to understand as everything is all together.

Copy link
Collaborator

@dragidavid dragidavid left a comment

Choose a reason for hiding this comment

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

Latest change fixed the failing tests 👌

@lukad lukad merged commit 548b83f into main Mar 17, 2025
2 checks passed
@lukad lukad deleted the devxp-2682-centralize-error-messages branch March 17, 2025 10:48
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.

2 participants