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

New Sbt code generation setting #371

Closed
2 tasks
juanpedromoreno opened this issue Jul 26, 2018 · 0 comments
Closed
2 tasks

New Sbt code generation setting #371

juanpedromoreno opened this issue Jul 26, 2018 · 0 comments

Comments

@juanpedromoreno
Copy link
Member

juanpedromoreno commented Jul 26, 2018

As part of this ticket, we need to add a new sbt setting to be able to specify custom imports including custom marshallers for serializing/deserializing data.

The @fedefernandez's proposal would be:

(Extensible) ADT (provided by frees-rpc atm):

abstract class MarshallersImport(val marshallersImport: String) extends Product with Serializable
case object BigDecimalAvroMarshallers extends MarshallersImport("import ....")
case object JavaTimeDateAvroMarshallers extends MarshallersImport("import ....")
case object JodaDateTimeAvroMarshallers extends MarshallersImport("import ....")

New Sbt Setting:

lazy val idlGenCodecImports: SettingKey[List[MarshallersImport]]

Default value:

List(BigDecimalAvroMarshallers, JavaTimeDateAvroMarshallers)

This new setting would bring the ability to define the custom user marshallers in the build.sbt.

  • Sbt Settings.
  • Docs.

Related to #370

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

No branches or pull requests

2 participants