julianpeeters / avrohugger

Generate Scala case class definitions from Avro schemas
Apache License 2.0
201 stars 120 forks source link

[Request] Add support for code-generating a vulcan.Codec #153

Open Daenyth opened 2 years ago

Daenyth commented 2 years ago

It would be very handy for avrohugger to be able to generate a vulcan.Codec - I think it makes sense as an extra module + configuration

vulcan supports deriving a codec from a case class with annotations. One path forward might be to have those annotations generated onto the class.

Another option which might be easier, if it's done as a separate module, is to generated the Codec into some place other than the companion object. It's less ergonomic because it would require import, but it's likely less work to implement