Skip to content

feat(errors): improve message generation for schema validation failures #27

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

Closed

Conversation

ruthvik-mt
Copy link

@ruthvik-mt ruthvik-mt commented Jul 1, 2025

Hey👋 @jdesrosiers!

Improved the getErrorMessage function in src/index.js and updated normalizeOutput.js logic to return descriptive messages for the following JSON Schema keywords:

  • pattern
  • minItems
  • maxItems
  • uniqueItems
  • format

All tests, linting, and type checks have passed.

Let me know if you'd like me to add support for more keywords or help with anything else! Happy to contribute!

@ruthvik-mt
Copy link
Author

@jdesrosiers pl review!

@ruthvik-mt ruthvik-mt changed the title feat(errors): add error messages for pattern, minItems, maxItems, uniqueItems, and format feat(errors): enhance getErrorMessage with support for additional validation constraints Jul 1, 2025
@ruthvik-mt ruthvik-mt changed the title feat(errors): enhance getErrorMessage with support for additional validation constraints feat(errors): improve message generation for schema validation failures Jul 1, 2025
@ruthvik-mt ruthvik-mt force-pushed the fix-better-error-messages branch from 8539c58 to 98b3817 Compare July 2, 2025 10:33
@ruthvik-mt
Copy link
Author

Hey @jdesrosiers!

Just pushed a small update - fixed a few typos and spelling issues, and made some minor improvements in the keyword error messages. Let me know if anything else needs adjusting!

@jdesrosiers
Copy link
Collaborator

Hi, @ruthvik-mt. Thanks for showing interest in this project! This is a Google Summer of Code project by @arpitkuriyal that I'm mentoring. It might be difficult to contribute much at this point because we're still in the early stages of figuring out how it's going to work. That means there's likely to be a lot of churn in the code.

Since this is @arpitkuriyal's project, I'll have him review first to make sure what you're doing is in line with what he's doing. Then I'll review as mentor.

In the future, please follow the contributing guidelines in the README. It's important to create an issue before starting work on anything in order to coordinate with others working on the project. You don't want to spend time on something and then find that Arpit was already working on it and your work can't be used.

@arpitkuriyal
Copy link
Collaborator

Hi @ruthvik-mt, Thank you for your contributions! I've already implemented all the keywords covered in your PR, and I'll be submitting my PR soon. Currently, I'm working on the more complex keywords.

In the future, please follow the contributing guidelines in the README.

Thanks again for your help!

@ruthvik-mt
Copy link
Author

Thank you @jdesrosiers and @arpitkuriyal for your feedback and for explaining the current stage of the project.

I understand the importance of aligning with the project’s direction and will make sure to follow the contributing guidelines going forward ,especially by opening an issue and coordinating before starting any work.Apologies for the oversight. I appreciate the opportunity to learn and would be happy to contribute to any upcoming tasks that fit the roadmap.

Looking forward to the progress ahead. Thanks again for the guidance!
Closing this PR now!

@ruthvik-mt ruthvik-mt closed this Jul 3, 2025
@ruthvik-mt ruthvik-mt deleted the fix-better-error-messages branch July 3, 2025 18:55
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.

3 participants