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

Implement support for @fieldDefaultValue annotation #385

Closed
jdegoes opened this issue Oct 24, 2022 · 2 comments · Fixed by #418
Closed

Implement support for @fieldDefaultValue annotation #385

jdegoes opened this issue Oct 24, 2022 · 2 comments · Fixed by #418
Assignees

Comments

@jdegoes
Copy link
Member

jdegoes commented Oct 24, 2022

After #203 is completed, then each specified annotation may be implemented for each of the supported codecs for which it makes sense to support the annotation.

This ticket is to implement the @fieldDefaultValue annotation. This annotation, which may be applied to any field of a record (case class), is a marker to deserializers that if the field is not present, the specified default value should be utilized.

The main place where this new annotation should be used is in the different protocols that ZIO Schema supports. For example, the zio-schema-json protocol, which has serialization / deserialization in the JSON protocol.

ZIO Schema already captures annotations, so it is only necessary to look at the annotations and ensure that serialization / deserialization respects them in every protocol where the annotation makes sense.

To complete this ticket, go to all existing protocols and modify to ensure @fieldDefaultValue is supported in each, with a test.

@juliano
Copy link
Contributor

juliano commented Oct 27, 2022

@jdegoes i'd like to work on the ticket

@juliano
Copy link
Contributor

juliano commented Oct 27, 2022

Actually, I will start with #377

This one is free - for now

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

Successfully merging a pull request may close this issue.

3 participants