The AsyncAPI specification defines fields for describing an application's API in an AsyncAPI document. While the document may reference other files for details or shared fields, it typically serves as a single, primary document that encapsulates the API description.
The AsyncAPI document is a communication contract between senders and receivers within an event-driven system. It specifies the payload content required for a service to send a message and provides the receiver with guidance about the message's properties.
1asyncapi: 3.0.02info:3 title: Cool Example4 version: 0.1.05channels:6 userSignedUp:7 address: user/signedup8 messages:9 userSignedUp:10 description: An event describing that a user just signed up.11 payload:12 type: object13 properties:14 fullName:15 type: string16 email:17 type: string18 format: email19 age:20 type: integer21 minimum: 1822operations:23 userSignedUp:24 action: send25 channel:26 $ref: '#/channels/userSignedUp'
Remember
Depending on the protocol (such as MQTT, AMQP, Kafka), your AsyncAPI document may have additional fields. For example, for configuring Kafka bindings.