AsyncAPI documents

Found an error? Have a suggestion?Edit this page on GitHub

An AsyncAPI document is a file that defines and annotates the different components of a specific Event-Driven API.

The file format must be JSON or YAML; however, only the subset of YAML that matches the JSON capabilities is allowed.

1asyncapi: 3.0.0
2info:
3  title: Example application
4  version: '0.1.0'
5channels:
6  userSignup:
7    address: 'user/signedup'
8    messages:
9      userSignedupMessage: 
10        description: A message describing that a user just signed up.
11        payload:
12          type: object
13          additionalProperties: false
14          properties:
15            fullName:
16              type: string
17            email:
18              type: string
19              format: email
20            age:
21              type: integer
22              minimum: 18
23operations:
24  publishUserSignedup:
25    action: 'send'
26    channel:
27      $ref: '#/channels/userSignup'

The AsyncAPI document is a machine-readable definition of your Event-Driven API. That document can be used afterward to generate documentation and code, validate the messages that Example application sends, and even apply API management policies to your messages before they arrive at the broker.

Your API documentation is now machine-readable (easily parseable by code) so the myriad of useful applications is endless.

Was this helpful?
Help us improve the docs by adding your contribution.
OR
Github:AsyncAPICreate Issue on GitHub