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

Missing 'default' definition #743

Closed
zeal18 opened this issue Oct 13, 2022 · 2 comments
Closed

Missing 'default' definition #743

zeal18 opened this issue Oct 13, 2022 · 2 comments

Comments

@zeal18
Copy link
Contributor

zeal18 commented Oct 13, 2022

Hi @sksamuel! Thank you for the such a great library! Recently I've faced an issue related to schema derivation: it ignores case class field default values.
For the model

case class FooV2(bar: String, baz: Int = 5)

it derives the following schema:

{"type":"record","name":"FooV2","namespace":"foo.bar","fields":[{"name":"bar","type":"string"},{"name":"baz","type":"int"}]}

as you can see, the default property for the baz field is missing.

Scala 3.2.0
avro4s: 5.0.3
-Yretain-trees compiler option is set

@stale
Copy link

stale bot commented Dec 23, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the abandoned label Dec 23, 2022
@stale stale bot closed this as completed Dec 31, 2022
@Zhen-hao
Copy link
Contributor

I'm having the same problem with Scala 3.3.0 and avro4s 5.0.4.

@sksamuel! Can you reopen this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants