AsyncAPI components are described in the AsyncAPI specification.
Note: The components
section can contain securitySchemes
, however, domains cannot contain them. Domains are for components that are referenced via the $ref
keyword, such as $ref: '#/components/schemas/MySchema'
. Security schemes, however, are referenced directly by their name:
security:
- bearerAuth: [] # "bearerAuth" is the name of the security scheme
so they must be defined in the API where they will be used.
AsyncAPI domains need to have components under the components
section.
components:
messages:
...
schemas:
...
parameters:
...
messageTraits:
...