Releases: actgardner/gogen-avro
v7.3.1
- Fixes a bug where enums, fields and records with newlines in the doc field generated invalid Go code.
v7.3.0
This release has a single change to fix the case where a record field name conflicts with a method name in the generated struct. For example, a record with the field schema
used to generate an invalid struct which had a method and a field Schema
. Now the field will be named Field_Schema
to avoid a collision.
v8.0.0-beta1
This is a beta release of major version 8.0. Changes in this release:
-
Includes the generic deserialization API introduced in 7.2.0, which supports deserializing arbitrary Avro data into standard Go types without code generation.
-
JSON deserialization better conforms to the Avro specification. This includes resolving aliases for JSON fields, fixing union type name encoding to be fully qualified, and setting fields to their default values when deserializing JSON data.
-
JSON encoding of
bytes
types is now correctly handled by using a customBytes
type, which is an alias for[]byte
. Previously these fields serialized and deserialized using the Golang default encoding, which was base64.bytes
are now serialized as a string of UTF escape sequences (ex.\u00fe
) with one sequence per byte. -
Similar to the above, the
default
value for fields with thebytes
type is now correctly handled. Previously a codepoint above\u009f
would be converted to their two byte UTF-8 encoding. We now correctly parse values like\u00fe
as a single byte (254). -
Aliases for fields and types are now resolved according to the specification - aliases in the reader schema are used to match writer names exclusively. Previously we would match fields or types if the writer aliases matched the reader name, or if a name within the same version of the schema matched the alias.
-
Deserialize<Type>
convenience methods are now generated for unions to make it easier to parse data where the root type is a union. -
The testing framework has been overhauled to provide better coverage for JSON encoding and schema evolution.
v7.2.0
Adds the generic
package which supports deserializing arbitrary Avro-encoded data (including) without generating code ahead of time. This feature is in beta, please report any issues or feature requests. The API may change in the upcoming 8.0 release.
v7.1.1
Unions always deserialize using an exact match by name before trying to resolve by compatible types, to better conform to the Java implementation.
v7.1.0
Fixes round-tripping unions with both string
and byte
types.
v7.0.0
- Move to go modules, the major version is now part of the import path
- Maps are now generated as a Golang
map[string]<avro type>
instead of a struct - Unions with null types are now a nullable pointer
- Generated types serialize and deserialize to JSON according to the Avro specification
- Generated types have less pointless whitespace and godoc comments are placed correctly
v6.5.0
- Adds Avro 64-bit CRC fingerprint to generated record structs
- Adds
soe
package with support for serializing and deserializing data in Avro's Single-Object Encoding format - The Object Container Format writer now writes the file header lazily when the first record is written, rather than in the constructor, to avoid blocking.
v6.4.0
- Add a flag
--sources-comment
which can be set tofalse
to suppress the list of input files in the generated source comment - Add support for computing the canonical form of schemas and the Avro 64-bit CRC
- Default to
null
codec when decoding OCF files without a specified codec - Add
Attribute
method toAvroType
andDefinition
- Several fixes to resolving schema evolution to align with the Avro specification
v6.3.0
- Adds a method to each generated enum type to convert strings to enum values
- Code generation uses Go templating instead of Sprintf