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

explicit ajv stack error #2634

Closed

Conversation

Lausselloic
Copy link
Contributor

@Lausselloic Lausselloic commented Dec 14, 2021

Reasons for making this change

Improve the error format from AJV. Currently it return a dotted path from schema like .foo.bar.mycustomProp is a required property into the stack error. What I ropose is to fetch "display" name of the property if it exists title or the property himself otherwise. It's more human readable and it's whats is needed for a user interface I think.

Related to #1337 need to enbale verbose mode of AJV

User could still create the old message by using Property and message returned into the error field

If this is related to existing tickets, include links to them as well. Use the syntax fixes #[issue number] (ex: fixes #123).

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@heath-freenome
Copy link
Member

@epicfaace if we bump the major version for my PR, maybe adding this one in at the same time makes sense?

@heath-freenome
Copy link
Member

@Lausselloic in the upcoming @rjsf v5 release the utils.js and validator.js files have been refactored into their own packages (see the rjsf-v5 branch). If you feel that this change is critical, I encourage you to port it onto that branch.

@heath-freenome
Copy link
Member

@Lausselloic So the v5 beta is now the master branch... Please consider porting this to the validator-ajv6 and validator-ajv8 packages.

@heath-freenome
Copy link
Member

Closing due to reimplementation in #3337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting changes breaking change v5 refactor Needs refactor due to v5 breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants