This is no longer the latest AsyncAPI release. Check out AsyncAPI 1.2.0.
It’s been a long time since we launched the first AsyncAPI stable version. Since September 20th last year, to be more specific. But, today, I’m happy to announce that AsyncAPI 1.1.0 version is out! 🎉
This version and, from now on, we’ll be following the semantic versioning approach. It means, version 1.1.0 supports version 1.0.0 documents. However, you’ll need to change your document’s asyncapi
version if you want to use the new features, otherwise, tooling will not work properly.
What’s new?
Support for oneOf
, anyOf
, and not
on schemas
It is now possible to use oneOf
, anyOf
, and not
schemas:
oneOf
Use oneOf
to specify that a schema, or a part of it, is valid against one and only one of the specified schemas.
Example:
1 2 3 4 5 6 7 |
user: type: object properties: id: oneOf: - type: string - type: number |
anyOf
Use anyOf
to specify that a schema, or a part of it, is valid against at least one of the specified schemas.
Example:
1 2 3 4 5 6 7 8 9 |
user: type: object properties: id: anyOf: - type: string maxLength: 4 - type: string enum: ['somethingLargerThan4ButOK'] |
not
Use not
to specify that a schema, or a part of it, must not be valid against the specified schema.
Example:
1 2 3 4 5 6 7 |
user: type: object properties: id: type: string not: enum: ['someReservedId'] |
Support for oneOf
on topic operations
It is now possible to specify that a topic can allow many message schemas, e.g.:
1 2 3 4 5 |
user.login: subscribe: oneOf: - $ref: '#/components/messages/user' - $ref: '#/components/messages/superuser' |
Support for topic parameters
Now you can define topic parameters, whenever it uses topic templating, e.g.:
1 2 3 4 5 6 7 8 9 |
topics: event.{streetlightId}.lighting.measured: parameters: - name: streetlightId description: The ID of the streetlight. schema: type: string publish: $ref: '#/components/messages/lightMeasured' |
Support for JMS scheme
We’ve added JMS to the list of the supported schemes, so it’s now possible to document APIs using this technology.
Small and frequent releases
I’ll be releasing more often from now on. Also, the size of the releases will tend to be smaller. If you want to get notified about new releases, subscribe using the following form.
And that’s pretty much everything! Eager to see what you document next!
[…] the last release, we added support for topic parameters, however, if the same parameter was present in multiple topics, you had to duplicate the […]