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(ewt-582): fixed OneOfJsonConverter for json deserialisation with both status and type fields #201

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

tl-mauro-franchi
Copy link
Contributor

No description provided.

@tl-mauro-franchi tl-mauro-franchi requested a review from a team as a code owner June 18, 2024 12:53
Copy link

swarmia bot commented Jun 18, 2024

}

if (_descriptor.TypeFactories.TryGetValue(discriminator.GetString()!, out var typeFactory))
// Fallback to status field
if (doc.RootElement.TryGetProperty("status", out discriminator)
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the drawback of removing this fallback?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mandates and payments might break as the actual type discriminator become the status field now.

@tl-mauro-franchi tl-mauro-franchi merged commit 433ecea into main Jun 18, 2024
1 check passed
@tl-mauro-franchi tl-mauro-franchi deleted the EWT-582/fix-oneoftypedescriminator branch June 18, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants