Skip to content

fix: Invalid code generation with some oneOf and anyOf combinations #642

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

Merged
merged 4 commits into from
Jul 2, 2022

Conversation

dbanty
Copy link
Collaborator

@dbanty dbanty commented Jul 2, 2022

Supercedes #638. Fixes #603

@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #642 (4def4dc) into main (3f1f951) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #642   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines         1713      1713           
=========================================
  Hits          1713      1713           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f1f951...4def4dc. Read the comment docs.

@dbanty dbanty merged commit ea9b350 into main Jul 2, 2022
@dbanty dbanty deleted the 603-fix-union-first-primitive-clause branch July 2, 2022 23:54
{% elif not loop.last or ns.contains_properties_without_transform %}
elif isinstance({{ source }}, {{ inner_property.get_instance_type_string() }}):
{% set has_first_clause = true %}
Copy link
Contributor

Choose a reason for hiding this comment

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

👀

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ahhh! What's that doing there? Nothing I think 😅

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.

Client generation error when primitive types precede object types in a required oneOf / anyOf union
2 participants