salsify / avromatic

Generate Ruby models from Avro schemas
MIT License
86 stars 16 forks source link

Add support for decimal logical type #151

Closed opti closed 1 year ago

opti commented 1 year ago

It adds support for the decimal logical type, so the following Avro schema can be processed correctly:

{
  "type": "bytes",
  "logicalType": "decimal",
  "precision": 4,
  "scale": 2
}

However, It's only supported by the Avro v1.11.x. If that's ok, I'm open for suggestions how to better restrict that feature to supported avro version.

https://avro.apache.org/docs/1.11.1/specification/#decimal

opti commented 1 year ago

@jturkel Thank you for the review. I've made updates for some of your comments and provided feedback for others.

opti commented 1 year ago

@jturkel any chance for another review?