Closed runerys closed 7 months ago
The Avro schema spec supports doc on enums: https://avro.apache.org/docs/1.11.1/specification/#enums
doc
This PR uses the System.ComponentModel.DescriptionAttribute for populating the enum doc node in Avro schemas.
System.ComponentModel.DescriptionAttribute
As discussed here https://github.com/ch-robinson/dotnet-avro/issues/131 . The PR https://github.com/ch-robinson/dotnet-avro/pull/219 implements this for record schemas.
This implements the same strategy for enums.
Note We had a list of local customizations (documentation, null handling, enum default values, DateOnly, TimeOnly, NodaTime), and most of these have been fixed in the later releases. Brilliant! This PR is a contribution to get rid of one more :)
What
The Avro schema spec supports
doc
on enums: https://avro.apache.org/docs/1.11.1/specification/#enumsThis PR uses the
System.ComponentModel.DescriptionAttribute
for populating the enum doc node in Avro schemas.Why
As discussed here https://github.com/ch-robinson/dotnet-avro/issues/131 . The PR https://github.com/ch-robinson/dotnet-avro/pull/219 implements this for record schemas.
This implements the same strategy for enums.
Note We had a list of local customizations (documentation, null handling, enum default values, DateOnly, TimeOnly, NodaTime), and most of these have been fixed in the later releases. Brilliant! This PR is a contribution to get rid of one more :)