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 oneOf generation with mixed types including primitives #1374

Merged
merged 3 commits into from
Mar 8, 2023

Conversation

nkzou
Copy link
Contributor

@nkzou nkzou commented Mar 8, 2023

Fixes the missing model in the generated python of https://github.com/DataDog/datadog-api-spec/pull/2093

This change allows there to be mixed types in oneOfs where some of the types are primitives. Previously, if there was a primitive type in the oneOf, the generation would skip the entire oneOf generation.

@nkzou nkzou requested a review from a team as a code owner March 8, 2023 21:18
@nkzou nkzou merged commit 3a701d6 into master Mar 8, 2023
@nkzou nkzou deleted the kevinzou/mixed_type_oneOfs branch March 8, 2023 22:13
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
* Fix early exit of oneOf generation with mixed types

* pre-commit fixes

* remove primitive check in case future oneOfs have other edge cases

---------

Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com> 3a701d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants