The way the DSL code is generated by createSchema regarding the apply partially applied function, it prevent the possibility to have overloaded apply methods on the companion object of a case class where the macro is being used. There's a FIXME in the code related to this:
https://github.com/ypg-data/sparrow/blob/master/core/src/test/scala/com.mediative.sparrow/SchemaSpec.scala#L67
The solution is to replace the following style in the generated code:
implicit val schema = (
field[String]("name") and
field[Long]("count")
)(apply _)
By something of this style:
implicit val schema = (
field[String]("name") and
field[Long]("count")
)((name: String, count: Long) => apply(name, count))
The way the DSL code is generated by
createSchemaregarding the apply partially applied function, it prevent the possibility to have overloaded apply methods on the companion object of a case class where the macro is being used. There's a FIXME in the code related to this:https://github.com/ypg-data/sparrow/blob/master/core/src/test/scala/com.mediative.sparrow/SchemaSpec.scala#L67
The solution is to replace the following style in the generated code:
By something of this style: