I'm creating an API for IEEE 1685-2009 IP-XACT. There is a special requirement to the schemas. In several schemas there is a choice between required fields, e.g. the valid schema may specify a set of required fields of which exactly one field may be present in the data. This feature does not appear to be supported in most python validation packages, so I decided to roll my own. Looking through the eve sources I found that the constructor for Eve accepts a validator class. I'm wondering if I could just encapsulate my own validator class in a new class emulating the api of cerberus.Validator or is replacing the validator going to be more complex?
I'm creating an API for IEEE 1685-2009 IP-XACT. There is a special requirement to the schemas. In several schemas there is a choice between required fields, e.g. the valid schema may specify a set of required fields of which exactly one field may be present in the data. This feature does not appear to be supported in most python validation packages, so I decided to roll my own. Looking through the eve sources I found that the constructor for Eve accepts a validator class. I'm wondering if I could just encapsulate my own validator class in a new class emulating the api of cerberus.Validator or is replacing the validator going to be more complex?
Thanks, Bernd