-
Notifications
You must be signed in to change notification settings - Fork 163
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
Cannot generate schema for sealed trait with enum implementors #697
Labels
Comments
potentially related to #668 ? |
/bounty $100 |
💎 $100 bounty • ZIOSteps to solve:
Thank you for contributing to zio/zio-schema! Add a bounty • Share on socials
|
I'm guessing an assigned bounty means that what I'm trying to do is indeed unsupported at this time? I was hoping I was just doing something wrong... |
💡 @pablf submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @pablf has been awarded $100! 🎈🎊 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm trying to use
zio-schema
withzio-http
to de/serialize request/responseBody
s. I have a sealed trait representing the response body of my API, and two implementors of that trait, both of which are enums, representing success bodies (with a"data"
field) and failure bodies (with a"message"
field), but cannot seem to generate a schema for this structure. The below scala-cli script is a minimal representation of what I've tried. This compiles but fails at runtime with aClassCastException
:The full error is
Am I just doing this incorrectly or is this something not supported?
The text was updated successfully, but these errors were encountered: