How to compile avro schema from an avsc that contains references using avrogen (C#)?

541 views Asked by At

I have these two avsc files, the first makes a reference to the second but when trying to compile using avrogen an error is returned and the schema is not generated.

Error:

Exception occurred. Undefined name: AnalogProperty at 'fields[0].type.items.fields[2].type.fields[0].type'

avsc 1

"doc": "Measurement Type, Analog or Discrete",
"name": "AnalogProperties",
"type": {
   "fields": [
     {
       "doc": "",
       "name": "RealPower",
       "type": "AnalogProperty"
     }
}

avsc 2

{
    "name": "AnalogProperty",
    "namespace": "Kafka.AvroSchemas",
    "doc": "AnalogProperty object",
    "type": "record",
    "fields": [{
            "doc": "Circuit from requested topology.",
            "name": "cValue",
            "type": "double"
        },
        {
            "doc": "Circuit from requested topology.",
            "name": "cTimestamp",
            "type": "string"
        },
    ]
}
0

There are 0 answers