-
Notifications
You must be signed in to change notification settings - Fork 156
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
Use Sealed Trait As Base Class? #501
Comments
@dalegaspi You can try to add the |
@plokhotnyuk yes i saw that...i was going to make the change but then i realized why this was not the default behavior: in a case where the parent class is in a different .xsd file as the child class (which applies in my case), this poses a problem since a sealed trait and its implementation needs to be in the same .scala file...there's a caveat of making sure to create an "intermediate class" that can be inherited in another xsd file. good thing there is code in there to indicate if the trait is not a root and ensure that it doesn't apply right now i'm doing it the lazy way and do a search and replace (to add |
update: looks like manually adding the appropriate now i'm just going to make changes to the plugin and make a PR to have an option to make the root traits sealed. cc: @plokhotnyuk |
I'm trying to use jsoniter-scala with the case classes generated using this awesome tool. the hindrance that i see is that for cases like this a
trait
is generated, but the problem is i cannot use jsoniter-scala macros to generate decoders because the basetrait
is not sealed. can we have perhaps an option to make the generated base classsealed
for this purpose?The text was updated successfully, but these errors were encountered: