AsyncAPI Support

AsyncAPI is a specification for describing Event-Driven Architecture (EDA). Systems that can be described with AsyncAPI include Kafka, RabbitMQ, MQTT, and AMQP, among others.

OpenAPI influenced the structure of AsyncAPI, which uses YAML (or JSON) and reuses many of the same components. For more information about the AsyncAPI ecosystem, see AsyncAPI.com.

Note

ReadyAPI supports AsyncAPI 2.x and 3.0 specifications.

Considerations

Keep the following in mind when using AsyncAPI in ReadyAPI:

  • ReadyAPI supports importing AsyncAPI definitions from a file or directly from SwaggerHub.

  • Only Kafka-based AsyncAPI definitions are supported for testing. For details, see Kafka Testing.

AsyncAPI 2.x and 3.0 - Key Differences

The following table summarizes the key differences between AsyncAPI 2.x and 3.0 as they apply to ReadyAPI:

Table 105. Key differences

Feature

AsyncAPI 2.x

AsyncAPI 3.0

Operations

Publish / Subscribe

Send / Receive

Operation names in the Navigator

Generic (Publish / Subscribe)

Actual names from the definition

Endpoints tab

Endpoints

Servers (separate Host, Pathname, and Protocol columns)

Specification tab

Read-only Specification tab available

Read-only Specification tab available

AsyncAPI version badge

Displayed on the definition panel only if the definition is imported in ReadyAPI 4.3.0 or later

Displayed on the definition panel

Definition version badge

Not shown

Displayed in definition properties

SwaggerHub import filter

2.x only

2.x and 3.x



Import an API definition

To import an API definition into ReadyAPI, follow these steps:

  1. Click ⋯ next to the APIs node in the Navigator and select Import API Definition, or right-click APIs and select Import API Definition.

  2. Select where your definition is stored:

    • My Computer - browse to the definition file on your computer.

    • URL - enter the URL of the definition.

    • Swagger - search for and select the definition from Swagger.

      Tip

      Use the filter dropdown to narrow results by AsyncAPI version - select ASYNC_API_2 for AsyncAPI 2.x definitions or ASYNC_API_3 for AsyncAPI 3.0 definitions.

  3. Click Import API.

    Note

    ReadyAPI displays two version badges in the top right corner: the AsyncAPI specification version and the definition version. The AsyncAPI version badge is visible only for definitions imported in ReadyAPI 4.3.0 or later. Definitions imported with an earlier version of ReadyAPI do not display this badge.

For more information, see Adding a Kafka API to the Project.

See Also

Publication date: