SRserves85 / avro-to-python

Light tool for compiling avro schema files (.avsc) to python classes
MIT License
25 stars 19 forks source link

Correct handling of fullnames. #18

Closed perj closed 2 years ago

perj commented 2 years ago

As per the Avro spec:

A fullname is specified. If the name specified contains a dot, then it is assumed to be a fullname, and any namespace also specified is ignored.

It's not completely clear that this also replaces the namespace for nested types, but that is how the Java avro-tools jar handles it, which I've used as the reference implementation.

Obviously, it should be preferred to not set both the name field to a fullname and also the namespace field, but we have done this in some legacy schemas and can't change them now, since the Schema Registry validator doens't allow changing the name.