README.md in avromatic-0.14.0.rc1 vs README.md in avromatic-0.14.0
- old
+ new
@@ -57,12 +57,12 @@
so that they can be referenced by id. Either `schema_registry` or
`registry_url` must be configured.
* **registry_url**: URL for the schema registry. Either `schema_registry` or
`registry_url` must be configured.
* **messaging**: An `AvroTurf::Messaging` object to be shared by all generated models.
- The `build_messaging!` method may be used to create a `Messaging` instance based
- on the other configuration values.
+ The `build_messaging!` method may be used to create a `Avromatic::Messaging`
+ instance based on the other configuration values.
* **logger**: The logger to use for the schema registry client.
* [Custom Types](#custom-types)
Example using a schema registry:
@@ -71,9 +71,18 @@
config.schema_store = AvroTurf::SchemaStore.new(path: 'avro/schemas')
config.registry_url = Rails.configuration.x.avro_schema_registry_url
config.build_messaging!
end
```
+
+#### Decoding
+
+* **use_custom_datum_reader**: `Avromatic` includes a modified subclass of
+ `Avro::IO::DatumReader`. This subclass returns additional information about
+ the index of union members when decoding Avro messages. This information is
+ used to optimize model creation when decoding. By default this information
+ is included in the hash returned by the `DatumReader` but can be omitted by
+ setting this option to `false`.
### Models
Models are defined based on an Avro schema for a record.