bids-validator icon indicating copy to clipboard operation
bids-validator copied to clipboard

Nested object validation using ajv

Open rwblair opened this issue 1 year ago • 1 comments

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.

rwblair avatar Jul 12 '24 18:07 rwblair

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 avatar Nov 07 '24 21:11 effigies