Closed devlucasc closed 4 years ago
I can't validate a schema like this: Data 1:
id: example type: type1 value: 10
Data 2:
id: example type: type2 value: value
Schema:
any(include('v1'), include('v2), include('v3')) --- v1: id: str() --- v2: type: regex('^type1') value: int() --- v3: type: regex('^type2') value: str()
I was only able to do that when I duplicated schema like this:
any(include('v2), include('v3')) --- v2: id: str() type: regex('^type1') value: int() --- v3: id: str() type: regex('^type2') value: str()
This occurs because validator in any operator are validated separatedely. I would like to make a conditional schema validator, defined by the type field
Duplicate of #91
I can't validate a schema like this: Data 1:
Data 2:
Schema:
I was only able to do that when I duplicated schema like this:
This occurs because validator in any operator are validated separatedely. I would like to make a conditional schema validator, defined by the type field