Skip to content

Releases: aml-org/amf

5.6.2

26 Sep 14:24
a9a34f0
Compare
Choose a tag to compare

Bug fixing

  • Fixed bug in avro validation related with inner union schemas with default values

What's Changed

Full Changelog: 5.6.1...5.6.2

What's new in AMF 5.6.1

24 Sep 20:46
cd063dc
Compare
Choose a tag to compare

AVRO Support in AMF

We're happy to announce we've added support for AVRO Schema 1.9.0 in AMF:

  • as a standalone document
  • inside Async APIs

an AVRO Schema has the following properties:

  • It's defined in a .json or .avsc file
  • It doesn't have a special key that indicates it's an AVRO Schema, nor it's version (like JSON Schema does with it's $schema)

Where we support and DON'T support AVRO Schemas

We Support AVRO Schemas (inline or inside a $ref):

  • as a standalone document or file
    • we encourage users to use the .avsc file type to indicate that's an avro file
    • must use the specific AvroConfiguration
  • inside a message payload in an AsyncAPI
    • the key schemaFormat MUST be declared and specify it's an AVRO payload
  • an AvroSchemaDocument can only be parsed with the specific AvroConfiguration

We don't support AVRO Schemas:

  • inside components --> schemas in an AsyncAPI
    • because we can't determine if it's an AVRO Schema or any other schema

Known AVRO Validation limitations

We're using the Apache official libraries for JVM and JS. The validation libraries differ in interfaces and implementations, and each has some known constraints:

JVM avro validation constraints

  • validation per se is not supported, we try to parse an avro schema and throw parsing results if there are any
    • this means it's difficult to have location of where the error is thrown, we may give an approximate location from our end post-validation
  • when a validation is thrown, the rest of the file is not being searched for more validations
    • this is particularly important in large avro schemas, where many errors can be found but only one is shown

Both JVM & JS validation constraints

  • "default" values are not being validated when the type is bytes, map, or array
  • the validator treats as invalid an empty array as the default value for arrays ("default": []) even though the Avro Schema Specification has some examples with it
  • if an avro record has a field that is a union that includes the root record itself (recursive reference) we fail to validate it correctly because we treat that shape as an unresolved/undefined shape. This only applies to the field inside the record, when validating the complete record the library validates correctly. In the future we'll try to ignore the cases that we are now failing and/or show a warning instead

More information here

for more information on how to use AVRO in amf check the adrs/0014-avro-support.md file.

Full Changelog: 5.5.4...5.6.1

What's new in AMF 5.6.0

23 Sep 21:46
dfe830f
Compare
Choose a tag to compare

AVRO Support in AMF

We're happy to announce we've added support for AVRO Schema 1.9.0 in AMF:

  • as a standalone document
  • inside Async APIs

an AVRO Schema has the following properties:

  • It's defined in a .json or .avsc file
  • It doesn't have a special key that indicates it's an AVRO Schema, nor it's version (like JSON Schema does with it's $schema)

Where we support and DON'T support AVRO Schemas

We Support AVRO Schemas (inline or inside a $ref):

  • as a standalone document or file
    • we encourage users to use the .avsc file type to indicate that's an avro file
    • must use the specific AvroConfiguration
  • inside a message payload in an AsyncAPI
    • the key schemaFormat MUST be declared and specify it's an AVRO payload
  • an AvroSchemaDocument can only be parsed with the specific AvroConfiguration

We don't support AVRO Schemas:

  • inside components --> schemas in an AsyncAPI
    • because we can't determine if it's an AVRO Schema or any other schema

Known AVRO Validation limitations

We're using the Apache official libraries for JVM and JS. The validation libraries differ in interfaces and implementations, and each has some known constraints:

JVM avro validation constraints

  • validation per se is not supported, we try to parse an avro schema and throw parsing results if there are any
    • this means it's difficult to have location of where the error is thrown, we may give an approximate location from our end post-validation
  • when a validation is thrown, the rest of the file is not being searched for more validations
    • this is particularly important in large avro schemas, where many errors can be found but only one is shown

Both JVM & JS validation constraints

  • "default" values are not being validated when the type is bytes, map, or array
  • the validator treats as invalid an empty array as the default value for arrays ("default": []) even though the Avro Schema Specification has some examples with it
  • if an avro record has a field that is a union that includes the root record itself (recursive reference) we fail to validate it correctly because we treat that shape as an unresolved/undefined shape. This only applies to the field inside the record, when validating the complete record the library validates correctly. In the future we'll try to ignore the cases that we are now failing and/or show a warning instead

More information here

for more information on how to use AVRO in amf check the adrs/0014-avro-support.md file.

Full Changelog: 5.5.4...5.6.0

5.5.4

30 Jul 22:17
65089b3
Compare
Choose a tag to compare

AVRO transformation and rendering support (ALPHA)

In the previous release we added support for AVRO parsing, which means creating an AvroConfiguration with an AvroParsePlugin and with that create a BaseUnitClient that has the parse() method that parses an AVRO Schema and returns an AvroSchemaDocument.

This release, we've added support for the transform() and render() methods, letting the user resolve the model and export it to .jsonld or to .json again.

To do this, we've created the AvroRenderPlugin and added it to the AvroConfiguration as well as the necessary transformation pipelines. Now the AVRO Configuration is much more complete and looks like this:

object AvroConfiguration extends APIConfigurationBuilder {
  def Avro(): AMFConfiguration = {
    common()
      .withPlugins(List(AvroParsePlugin, AvroRenderPlugin))
      .withTransformationPipelines(
        List(
          AvroSchemaTransformationPipeline(),
          AvroSchemaEditingPipeline(),
          AvroSchemaCachePipeline()
        )
      )
  }
}

We're expecting to continue this growth and launch AVRO Validation in the next release, will keep you updated.

For more information about transformation and rendering check the following documentation:

What's Changed

Full Changelog: 5.5.3...5.5.4

5.5.3

05 Jul 13:38
66e2d74
Compare
Choose a tag to compare

AVRO Support (ALPHA)

AVRO Schema Support in Async

Added support to parsing of AVRO Schemas in Async 2.x payload definitions (inlined or referencing to an external file).
This support is currently limited, only for parsing, not for validation or emission.

AVRO Schema Fragment

Added support to parsing of AVRO Schemas as a fragment using the new AvroConfiguration, returning an AvroSchemaDocument. This is only for AVRO Schema files parsed using this specific configuration, files referenced from an Async 2.x API will be processed as ExternalFragment as usual.
This support is currently limited, only for parsing, not for validation or emission.

What's Changed

Full Changelog: 5.5.2...5.5.3

5.5.2

29 May 20:08
b288e5d
Compare
Choose a tag to compare

What's Changed

This release finished the support for multiple binding versions, enhancing the flexibility and compatibility of our platform. The new bindings include updates for Solace, Kafka, AMQP, HTTP.
In the spec, by default if not present, the version of the binding is the latest. We chosen to ignore this behavior, because it could lead to a broken AsyncAPI contract when a new version of the binding is introduced. Instead of that. This approach prevents breaking changes for users relying on the latest versions. By defaulting to these versions, we maintain consistency and ensure that essential fields are supported without introducing unexpected incompatibilities.

Default Binding Versions
The default binding versions have been selected to ensure stability:

  • Solace:

    • async 2.0 to async 2.6 default version is 0.3.0
  • AMQP:

    • async 2.0 to async 2.6 default version is 0.2.0
  • HTTP and GooglePubSub:

    • async 2.0 to async 2.6 default version is 0.1.0
  • MQTT:

    • async 2.0 to async 2.6 default version is 0.1.0
  • AnypointMQ:

    • async 2.0 to async 2.6 default version is 0.0.1
  • Kafka Bindings version:

    • KafkaOperationBinding and KafkaMessageBinding
      • Async 2.0 default version is 0.1.0
    • KafkaOperationBinding and KafkaMessageBinding
      • Async 2.1 to 2.6 the default version is 0.3.0
    • KafkaServerBinding and KafkaChannelBinding
      • Async 2.1 to 2.6 the default version is 0.3.0
  • Pulsar:

    • Async 2.0 to async 2.6 default version is 0.1.0
  • Mercure:

    • Async 2.0 to async 2.6 default version is 0.1.0
  • W-15425041: release-fix: remove '.' in fields id and displayNames by @arielmirra in #1983

  • W-15696514: change amqp binding default version to 0.2.0 by @arielmirra in #1990

  • W-15570769: fix oas components unresolved ref violations by @arielmirra in #1988

  • W-15425041: support HTTP binding versions 0.1.0, 0.2.0, and 0.3.0 by @arielmirra in #1987

  • W-15425034: add google binding version 010 & 020 by @arielmirra in #1996

  • W-15425058: add mqtt version 010 & 020 by @arielmirra in #1997

  • W-15425062: Add support for Solace Binding Versioning by @damianpedra in #1982

  • W-15425058: fix solace operation topic by @arielmirra in #1998

  • W-15845362 - Fixed some missing matches with new Async 2.x Specs by @looseale in #1999

  • W-15643510-fix default version fon bindings by @damianpedra in #2000

Full Changelog: 5.5.1...5.5.2

5.5.1

10 May 20:15
18cbd0a
Compare
Choose a tag to compare

What's Changed

Full Changelog: 5.5.0...5.5.1

Changes in AMF 5.5.0

12 Apr 19:58
5cab5ba
Compare
Choose a tag to compare

What's changed

Added parsing, transformation, validation and emission support for Async 2.1 to 2.6

We've added support for Async 2.1, 2.2, 2.3, 2.4, 2.5, and 2.6 versions.

The new bindings are:

  • Async 2.1 onwards:
    • Mercure and IBMMQ bindings support
  • Async 2.2 onwards:
    • AypointMQ binding support
  • Async 2.3 onwards:
    • Solace binding support
  • Async 2.5 onwards:
    • GoglePubSub binding support
  • Async 2.6 onwards:
    • Pulsar binding support

For more information about each binding check out the asyncapi bindings repository.

New AsyncApi transformation steps

We've added transformation steps that add more metadata to async APIs. While this features were added in specific async versions, we're running these steps to all Async APIs (2.x.x)

  • ChannelServersResolutionStage
    • Specifies which servers apply to each channels (all servers by default unless specified)
  • OperationsSecurityResolutionStage
    • Specifies which security schemes apply to each operation (all by default unless specified)

Async bindings versions limitations

At the moment of this release, for bindings that already existed with Async 2.0 (Kafka, Amqp091, HTTP, MQTT, WebSocket): we made no changes there, the code is the same that existed for Async 2.0, so the supported version is the 1.0.0 of each binding.

For new bindings added between Async 2.1 and Async 2.6 (Solace, Pulsar, AnypointMQ, IBMMQ, Googlepubsub): the supported version is the immediate previous to the Async 3.0 commit (feat!: release v3 compatible bindings).

We know this is not exactly the correct behavior, but we didn't detected this until some weeks ago (the spec is not very clear about it).
We'll be adding support for all the bindings versions to allow you to choose the desired version using the bindingVersion field. This is coming in a future release.

Commits

New Contributors

Full Changelog: 5.4.9...5.5.0

5.4.9

07 Mar 14:00
073d8a1
Compare
Choose a tag to compare

What's Changed

Full Changelog: 5.4.8...5.4.9

5.4.8

14 Feb 13:27
25fd0ed
Compare
Choose a tag to compare

What's Changed

Full Changelog: 5.4.7...5.4.8