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

Added custom validator to extend validation exceptions #429

Merged
merged 2 commits into from
Mar 11, 2025

Conversation

Daniel-VM
Copy link
Member

@Daniel-VM Daniel-VM commented Mar 11, 2025

This update enhances the JSON Schema validation process by allowing the string "Not Provided" as a valid input for numeric fields (integer, number) and date-formatted strings (string, format: date). The new implementation integrates validate_with_exceptions(), which filters out specific type errors while ensuring all other validation rules remain enforced. This approach maintains strict schema validation while introducing flexibility for missing values, improving data handling without modifying the schema structure.

Closes #425

@Daniel-VM Daniel-VM marked this pull request as ready for review March 11, 2025 16:38
@saramonzon
Copy link
Member

I've approved the PR, but could you add a test, so the json is validated even if some integer value is not provided?

@Daniel-VM Daniel-VM merged commit ac840f5 into BU-ISCIII:develop Mar 11, 2025
8 checks passed
@Daniel-VM
Copy link
Member Author

Yes, I'll open another issue to add a test

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