Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: replace oneOf with anyOf #421

Merged
merged 1 commit into from
Jan 29, 2024
Merged

fix: replace oneOf with anyOf #421

merged 1 commit into from
Jan 29, 2024

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented Jan 25, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants