-
-
Notifications
You must be signed in to change notification settings - Fork 229
Invalid code generated for nullable discriminated union #958
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
Comments
codebutler
pushed a commit
to codebutler/openapi-python-client
that referenced
this issue
Feb 12, 2024
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 20, 2024
fixes #958 --------- Co-authored-by: Dylan Anthony <43723790+dbanty@users.noreply.github.com> Co-authored-by: Dylan Anthony <dbanty@users.noreply.github.com>
dbanty
added a commit
that referenced
this issue
Feb 20, 2024
This PR was created by Knope. Merging it will create a new release ### Fixes #### Remove spurious field_dict.update({}) for types without properties (#969) #### Fix invalid type check for nested unions Nested union types (unions of unions) were generating `isinstance()` checks that were not valid (at least for Python 3.9). Thanks to @codebutler for PR #959 which fixes #958 and #967. Co-authored-by: GitHub <github-actions@github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Given the schema below, using the generated code like:
fails with:
OpenAPI Spec File
Desktop
Additional context
The failing generated code is:
Using
instanceof
on aUnion
with quoted types is not allowed:The text was updated successfully, but these errors were encountered: