Python Cerberus: multipe schemas for a single filed?
问题 I am trying to use Cerberus to validate some data but I run into a problem. I defined several smaller schema such as: A = {"type": "dict", "required": False, "schema": {"name": {"type": "string"}}} B = {"type": "dict", "required": False, "schema": {"age": {"type": "integer"}}} C = {"type": "dict", "required": False, "schema": {"gender": {"type": "string"}}} And the higher level schema is like: {"something": {"type": "list", "schema": "type": [A, B, C]}} This obviously doesn't work. I want to