Overview
I have a lot of .yaml files, and a schema to validate them. Sometimes, a "incorrect" value, is in fact correct.
I need some way to ignore some fields. No validations should be performed on these fields.
Example
## file -- a.yaml
some_dict:
some_key: some_valid_value
## file -- b.yaml
some_dict:
some_key: some_INVALID_value # cerberus: ignore
How can I do this?
Quick Answer (TL;DR)
cerberus
package supports composite validation "out of the box".Detailed Answer
Context
Problem
Solution
validation-success
,validation-fail
, orvalidation-skipped
Example
Sample validation rulesRationale
Pitfalls
rule_vpath
, which tells the system when to trigger specific rules, this adds a dependency on jmespath.See also