Add custom logical types
closes #435
Hi @nrwiersma
This PR adds the possibility to register custom logical types for the schema. These logicaltypes are primitive, and does not include logic for handling custom encoding/decoding, but simply adds the the custom logicalType to be referenced in the schemas.
I have added the WithCustomLogicalType function as a SchemaOption, but not at all schemas use this option - I saw this pattern was already used for other schema options.
Let me know what you think :)
Hi @nrwiersma
Thank you for the feedback! I totally get what you are saying, there ought to be a more elegant approach. Do you have another approach in mind?
I am toying with the idea of adding something along the lines of Parser Hooks, which would allow new types to be derived from the Avro Schema types, but extended to any specific need. My hope is that the hooks would allow arb parsing of parameters into a Schema structure without having to actually change the underlying types. The thought is still a work in progress though.