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

Add support for multiple flatten enums #320

Merged
merged 4 commits into from
Aug 19, 2024

Conversation

rlebran
Copy link
Contributor

@rlebran rlebran commented Aug 19, 2024

Update #264 following v1 merge on master.

Fix #165.

Use all_of when flattening multiple subschemas.

There is still a limitation when flattening required enum. We lose the information that the field is required. This is not caused by this PR. This could be fix in another PR.

We use this fix in apistos.

@GREsau
Copy link
Owner

GREsau commented Aug 19, 2024

Thanks for the PR! I amended it so that it no longer overwrites the allOf in the original schema. Otherwise, when flattening more than 3 enums, the 3rd and 4th would overwrite the 1st and 2nd

@GREsau GREsau merged commit 5d58377 into GREsau:master Aug 19, 2024
4 checks passed
@rlebran
Copy link
Contributor Author

rlebran commented Aug 20, 2024

Thank you so much for the work and the merge !

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.

a second flattened enum in a structure is omitted from the schema
2 participants