gogen-avro icon indicating copy to clipboard operation
gogen-avro copied to clipboard

Unable to resolve type reference

Open EArbeitman opened this issue 2 years ago • 1 comments

Hi,

I'm attempting to parse the following avro schema:

{
  "namespace": "com.compass.common.entities.v1",
  "name": "ResourceRef",
  "type": "record",
  "doc": "Representation of a specific resource with its id and its type",
  "fields": [
    {
      "name": "resourceId",
      "type": {
        "type": "string",
        "avro.java.string": "String"
      }
    },
    {
      "name": "resourceType",
      "type": "com.compass.common.entities.v1.ResourceType"
    }
  ]
}

My go code that does the parsing:

		schema, err := compiler.ParseSchema(byteValue)
		if err != nil {
			log.Fatalf("failed to parse schema", err)
		}

When that code is executed, I get the following error:

ailed to parse schema%!(EXTRA *errors.errorString=Unable to resolve type reference com.compass.common.entities.v1.ResourceType)

I'm wondering if this library supports parsing custom types? Any guidance would be appreciated.

Thank you,

EArbeitman avatar Sep 07 '22 18:09 EArbeitman

Hey @actgardner any ideas?

EArbeitman avatar Sep 13 '22 18:09 EArbeitman