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

Properly handle unions in from_dict #185

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

JordonPhillips
Copy link
Contributor

Issue #, if available:

Fixes #184

Description of changes:

When calling from_dict, unions need to use their special global method. This was already being generated, just never called.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

When calling from_dict, unions need to use their special global
method. This was already being generated, just never called.
@JordonPhillips JordonPhillips requested a review from a team as a code owner October 10, 2023 13:57
Copy link
Contributor

@nateprewitt nateprewitt left a comment

Choose a reason for hiding this comment

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

:shipit:

@nateprewitt
Copy link
Contributor

Are we not ignoring __type for unions?

@nateprewitt
Copy link
Contributor

Yep, we need to update this block to filter out __type for the new protocol test from smithy-lang/smithy#1945.

I'm alright merging this one since we know the issue and doing a follow up PR to fix the protocol test.

@JordonPhillips JordonPhillips merged commit 94fdd7d into develop Oct 10, 2023
4 of 5 checks passed
@JordonPhillips JordonPhillips deleted the union-list-fromdict branch October 10, 2023 16:17
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.

List of Unions are not deserialized properly from_dict attribute not present on UnionType
2 participants