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

codegen: Fix issues with jsoniter in scala3 #3963

Merged

Conversation

hughsimpson
Copy link
Contributor

Fixes a couple of issues with jsoniter in scala 3:

  • Enum serde generation now works
  • Custom discriminator mappings now work

I'm not sure what magic makes JsonCodecMaker.simpleClassName work when trying to construct the full path name fails, but since the parent traits for all oneOf definitions are sealed, and our class heirarchy is completely flat, there's no potential for ambiguity just using the simple class name.

With this change, we no longer do anything with the full package path in the serde generations, so I was able to remove that parameter entirely from the class, which is nice.

@adamw
Copy link
Member

adamw commented Aug 5, 2024

Nice work as always, thanks :)

@adamw adamw merged commit 9916314 into softwaremill:master Aug 5, 2024
22 checks passed
@hughsimpson hughsimpson deleted the fix_issues_with_jsoniter_in_scala3 branch August 5, 2024 11:43
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