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: correctly merge enums #410

Merged
merged 2 commits into from
Jan 15, 2024
Merged

fix: correctly merge enums #410

merged 2 commits into from
Jan 15, 2024

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented Jan 12, 2024

Enums are currently merged using allOf. This is incorrect and leads to impossible validation as allOf does intersection (i.e value must be present in both enum sets to be correct), not union (i.e. value must be present in one of both sets, what we want here).

While there is no good built-in way to create extensible enum in openapi, using oneOf is considered an acceptable workaround.

Note that while merged values appear in the swagger UI, this is actually a bug

Copy link
Collaborator

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rolfyone rolfyone merged commit d4f5ecf into ethereum:master Jan 15, 2024
3 checks passed
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.

2 participants