ethereum / beacon-APIs

Collection of RESTful APIs provided by Ethereum Beacon nodes
https://ethereum.github.io/beacon-APIs/
Creative Commons Zero v1.0 Universal
328 stars 167 forks source link

fix: replace oneOf with anyOf #421

Closed jeluard closed 7 months ago

jeluard commented 7 months ago

oneOf is currently used the following way (except for enums):

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.