Skip to content

Releases: beam-community/avro_ex

v2.1.0

28 Mar 16:01
Compare
Choose a tag to compare

v2.1.0 - March 28th, 2023

Added

  • Support for tagged unions in named fields
  • AvroEx.encode/3 supports a :include_block_byte_size option for encoding block size

Fixed

  • Allow empty strings as namespaces
  • Fix encodeable? checks for int and float
  • Set time values to proper precision on decoding
  • Fixed reference type name generation

v2.0.1

04 Apr 11:12
8214503
Compare
Choose a tag to compare

v2.0.1 - April 3rd, 2022

Fixed

  • Fixed bug where Array and Map children of Unions would fail to parse

v2.0.0

08 Mar 17:46
7204579
Compare
Choose a tag to compare

v2.0.0 - March 8th, 2022

Documentation
Blog Post

Changed

  • AvroEx.encode/2 now returns {:error, AvroEx.EncodeError.t()} in the case of an error
  • Primitive integer types now represented as %Primitive{type: :int} instead of %Primitive{type: :integer}
  • Primitive null types now represented as %Primitive{type: :null} instead of %Primitive{type: nil}
  • Schema decoding now supports directly passing Elixir terms, will strictly validate the schema, and produce helpful error messages
  • Removed Ecto as a dependency
  • AvroEx.Schema.full_name/2 - reverses the order of the arguments, accepting a Schema type or name, followed by the namespace

Added

  • AvroEx.encode!/2 - identical to encode/2, but returns raw value. Raises on error
  • AvroEx.decode!/2 - identical to decode/2, but returns raw value. Raises on error
  • AvroEx.decode_schema/1 and AvroEx.decode_schema!/ in place of AvroEx.parse_schema/1
  • Support for encoding and decoding date logical times to and from Date.t()
  • Schema decoding adds a :strict option that will strictly validate the schema for unrecognized fields
  • AvroEx.encode_schema/2 - encode a AvroEx.Schema.t() back to JSON. Supports encoding the schema to Parsing Canonical Form
  • AvroEx.Schema.namespace/2 - Returns the namespace of the given Schema type

Deprecated

  • AvroEx.parse_schema/1
  • AvroEx.parse_schema!/1
  • AvroEx.named_type!/2

v1.2.0

20 Feb 16:16
Compare
Choose a tag to compare

v1.2.0

Fixed

  • Fix exception when encoding bad Record data
  • Address dialyzer issues
  • Add type for AvroEx.Schema.Record.Field to fix compilation error
  • Fix long encoding
  • Fix variable integer and long decoding

Added

  • Support encoding DateTime and Time to logical types in Union

Changed

  • Records can accept atoms for encoding keys
  • String values can accept atoms for encoding
  • Enums can accept atoms for encoding
  • Simplify integer and long encoding

Version 1.1.0

10 Mar 20:41
Compare
Choose a tag to compare
v1.1.0

Update ExDoc and version