I can do,
{ \"type\": \"record\", \"name\": \"Foo\", \"fields\": [ {\"name\": \"bar\", \"type\": { \"type\": \"record\",
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.
undefined name: Bar.avro