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

Nested object validation using ajv #13

Open
rwblair opened this issue Jul 12, 2024 · 1 comment
Open

Nested object validation using ajv #13

rwblair opened this issue Jul 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@rwblair
Copy link
Member

rwblair commented Jul 12, 2024

example: schema.metadata.StimulusPresentation

Do we add recommended_fields to the json schema language? Or call validation multiple times swapping out required entry in json schema between required_fields and recomended_fields and adjust severity accordingly.

@effigies effigies transferred this issue from bids-standard/legacy-validator Nov 4, 2024
@effigies
Copy link
Contributor

effigies commented Nov 7, 2024

Or call validation multiple times swapping out required entry in json schema between required_fields and recomended_fields and adjust severity accordingly.

I vote for this approach. I think you only need two passes, since the first one will catch required fields at any level. You might need to drop additionalProperties for the second pass, but I haven't thought that all the way through.

@effigies effigies added the enhancement New feature or request label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants