Details
Description
C# needs to support default enum values as referenced in the 1.9.2 version of the Avro specification.
For example:
{ "type": "enum", "name": "Test", "symbols": [ "Unknown", "A", "B" ], "default": "Unknown" }
With the schema provided above, the "Unknown" token should be the value when a value is passed that is not listed in the symbols.
Requirements:
- The default token must exist in the list of symbols when parsing the schema.
- When setting the value of the GenericEnum, check if the default is set, and if it is use it if the desired value is not in the symbol map.
- Codegen should assign the default symbol to the field by default
- The existing behavior should not change if a default is not specified
Attachments
Issue Links
- links to