sbt-avrohugger
sbt-avrohugger copied to clipboard
org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name
Hi, We have an avsc file that defines com.ovoenergy.global.SourceMetadata and indeed after sbt compile i can notice the generated Scala case class com.ovoenergy.global.SourceMetadata. Is there a way to import an avsc into an avsc or somehow inform the dependency? Thank you org.apache.avro.SchemaParseException: "com.ovoenergy.global.SourceMetadata" is not a defined name. The type of the "sourceMetadata" field must be a defined name or a {"type": ...} expression. at org.apache.avro.Schema.parse(Schema.java:1637) at org.apache.avro.Schema$Parser.parse(Schema.java:1396) at org.apache.avro.Schema$Parser.parse(Schema.java:1367)
the apache avro is 1.9.1 i use this in avsc, tried it in few places: "imports": ["commonSourceMetadata3.avsc"],
ok, the imports statement is only supported in Avro IDL. However, the Maven Avro plugin does offer support for declaring a set of avsc files available to other ones that just need to reference the imported/common definitions by name. Also I know AvroHugger has a method to sort files by dependencies, is it possible to have a feature, to which i can contribute if possible, that just calls that method in a lifecycle point?