The new version of the AsyncAPI specification - 2.3.0 - is now available.
This is a minor release, and it doesn't bring any breaking changes. You can switch to it by modifying the following value in your AsyncAPI file
Servers and channels can now be defined as reusable components
To allow for more flexibility in how AsyncAPI documents are structured and enable content to be reused,
channels can now be defined as reusable components.
1asyncapi: 2.3.0 2servers: 3 production: 4 $ref: '#/components/servers/myserver' 5channels: 6 some/events: 7 $ref: '#/components/channels/myChannel' 8components: 9 servers: 10 myserver: 11 url: "http://localhost:5000/ws" 12 protocol: ws 13 channels: 14 myChannel: 15 description: "mychannel"
These are added to the many other aspects of the AsyncAPI specification which can be declared as reusable components. You can see the full list in the Components Object section of the AsyncAPI specification.
New protocol bindings
The specification is now extended to support another custom protocol through the bindings feature:
Regular expressions are now Unicode-compliant. This enhancement to the specification from Sergio Moya means that regular expressions (found in
patternProperties fields) are now Unicode-compliant (according to ECMA-262).
This improves compatibility with some JSON Schema parsers. For more details, check out the pull request.
$ref field in Channel Item Object is now deprecated from AsyncAPI 2.3.0.
The current plan is that the
$ref field will be removed from Channel Item Object in AsyncAPI 3.0, and replaced with Reference Object.
For more detail, you can see the discussion about this issue in Github.
The following official AsyncAPI tools are already updated to support 2.3.0 version of the specification:
- JSON Schema that supports validation of AsyncAPI documents is updated in this repository. Also @asyncapi/specs package has been updated on NPM to version 2.13.0, and it contains the 2.3.0 JSON Schema.
- HTML template uses the latest @asyncapi/react-component package. Upgrade to 0.24.7 version.
- Modelina now also accepts AsyncAPI documents valid against the 2.3.0 version of the spec. Upgrade to 1.46.0 version.
- Generator uses the latest @asyncapi/parser package, so while generating output, it can validate 2.1.0 documents. Upgrade to 1.9.0 version. Last but not least is the AsyncAPI Studio. Check new studio with this example.
We aim to have a regular cadence of releases of the AsyncAPI specification, four times a year. For more information about when to expect future releases, you can see our release process document.
We're also working on the next major release of the AsyncAPI specification: 3.0.0. If you'd like to contribute, or just follow the discussions, you can see the milestone on Github.