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

[BUG] oneOfUsingField fails for case object enums that inherit enumeratum EnumEntry reproducer #1976

Merged

Conversation

seglo
Copy link
Contributor

@seglo seglo commented Mar 24, 2022

Similar to #1950 this example is unable to compile. I think the main distinction is the use of enumeratum.EnumEntry and possibly the conflicting tapir configuration that this case is trying to override with a custom mapping for the discriminator.

[error] /home/seglo/source/tapir/integrations/enumeratum/src/test/scala/sttp/tapir/codec/enumeratum/TapirCodecEnumeratumTest.scala:138:83: type mismatch;
[error]   ee.type|OfferType with scala.Product with java.io.Serializable
[error]       Schema.oneOfUsingField[CreateOfferRequest, OfferType](_.`type`, _.entryName)(
[error]                                                                                   ^

@seglo seglo changed the title [BUG] oneOfUsingField fails for case object enums that inherit enumeratum EnumEntry [BUG] oneOfUsingField fails for case object enums that inherit enumeratum EnumEntry reproducer Mar 25, 2022
@adamw
Copy link
Member

adamw commented Mar 28, 2022

Closes #1981

@adamw adamw merged commit 4354132 into softwaremill:master Mar 28, 2022
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.

2 participants