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

Fixed decoder for enum with discriminator #610

Merged
merged 4 commits into from
Nov 18, 2023
Merged

Conversation

pablf
Copy link
Member

@pablf pablf commented Oct 10, 2023

Fixes #609. I have checked and the problem was present in zio-schema since v0.4.0 at least. The reason is that SchemaGen.anyEnumerationAndValue, used to test enums, only generates enums with primitives as cases. I haven't changed that because I was unsure if there was some particular reason for it. It might be possible that other similar bugs exist and that it's better to make a more exhaustive anyEnumerationAndValue.

@pablf pablf requested a review from a team as a code owner October 10, 2023 14:18
@vigoo vigoo merged commit b0b7062 into zio:main Nov 18, 2023
13 checks passed
@pablf pablf deleted the fix-jsonDecoder branch January 23, 2024 10:14
@pablf pablf restored the fix-jsonDecoder branch January 23, 2024 10:14
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.

JsonDecoder fails on discriminated ADT with case object
2 participants