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 #1981

Closed
seglo opened this issue Mar 25, 2022 · 1 comment
Milestone

Comments

@seglo
Copy link
Contributor

seglo commented Mar 25, 2022

Tapir version: 1.0.0-M4

Scala version: 2.12.12

Describe the bug

oneOfUsingField fails for case object enums that extend enumeratum.EnumEntry. This bug is similar to #1950.

How to reproduce?

I created a reproducer #1976. It fails at compile time.

[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
Copy link
Contributor Author

seglo commented Mar 28, 2022

Thank you, Adam!

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

No branches or pull requests

2 participants