An AsyncAPI document is a file that defines and annotates the different components of a specific Event-Driven API.
The format of the file must be JSON or YAML; however, only the subset of YAML that matches the JSON capabilities is allowed.
1asyncapi: 2.2.0 2info: 3 title: Example 4 version: 0.1.0 5channels: 6 user/signedup: 7 subscribe: 8 message: 9 description: An event describing that a user just signed up. 10 payload: 11 type: object 12 additionalProperties: false 13 properties: 14 fullName: 15 type: string 16 email: 17 type: string 18 format: email 19 age: 20 type: integer 21 minimum: 18
The AsyncAPI document is a machine-readable definition of your Event-Driven API. This document can be used afterward to generate documentation and code, validate the messages your application receives, and even apply API management policies to your messages before they arrive to your broker.
Your API documentation is now machine-readable –easily parseable by code— so the myriad of useful applications is endless.