Lets say you have the following kind of specification: ```yaml vehicle_list: - spaceship: name: "Millenium Falcon" crew: - "Han Solo" - "Chewbacca" - time_machine: name: "The Dolorean" inventor: "Doc Brown" - spaceship: name: "The Enterprise" crew: - "Jean-Luc Picard" - "Data" ``` It would be nice to have a `OneOf` combinator to specify that the node matches one of a known list of schemas: ```python schema = { MK.Type: types.NamedDict, MK.Content: { "vehicles_list": { MK.Type: types.List, MK.Content: { MK.Item: OneOf([ {MK.Type: types.NamedDict, Mk.Content: {"spaceship": {}}, {MK.Type: types.NamedDict, Mk.Content: {"time_machine": {}}, ]) } } } } ``` This would also be handy for specifying that a field can be either a string or a float: ```python OneOf([{MK.Type: types.Float}, {MK:Type: types.String}]) ```
Lets say you have the following kind of specification:
It would be nice to have a
OneOfcombinator to specify that the node matches one of a known list of schemas:This would also be handy for specifying that a field can be either a string or a float: