Can I split an Apache Avro schema across multiple files?

前端 未结 6 1495
青春惊慌失措
青春惊慌失措 2020-12-24 12:43

I can do,

{
    \"type\": \"record\",
    \"name\": \"Foo\",
    \"fields\": [
        {\"name\": \"bar\", \"type\": {
            \"type\": \"record\",
             


        
6条回答
  •  旧时难觅i
    2020-12-24 13:00

    The order of imports in the pom.xml matters. You must import the subtypes first before processing the rest.

    
        ${project.basedir}/src/main/resources/avro/Bar.avro
        ${project.basedir}/src/main/resources/avro/Foo.avro
    
    

    That would unblock the codegen from emitting undefined name: Bar.avro error.

提交回复
热议问题