oneOf is currently used the following way (except for enums):
first element is an object from phase0
then a couple of variations per fork, adding extra properties
So when an object from a later phase (e.g. bellatrix) has to be validated, it also matches the definition fromphase0, .. (unless it's more complex than just new properties).
Which is incorrect as oneOf must match a single definition.
What we want here is anyOf, that matches if one or more definitions matches.
oneOf
is currently used the following way (except forenums
):So when an object from a later phase (e.g.
bellatrix
) has to be validated, it also matches the definition fromphase0
, .. (unless it's more complex than just new properties). Which is incorrect as oneOf must match a single definition.What we want here is
anyOf
, that matches if one or more definitions matches.