The sections below include information about the usages of the Ballerina AsyncAPI tool.

AsyncAPI to Ballerina

The AsyncAPI to Ballerina command supports several usages in the Ballerina AsyncAPI tool as follows.

bal openapi [-i | --input] <asyncapi-contract-file-path> [-o | --output] <output-location>

The command-line arguments below can be used with the command for each particular purpose as described below.

Argument Description
-i, --input The asyncapi-contract-path parameter specifies the path of the AsyncAPI contract file (e.g., my-api.yaml or my-api.json) and is mandatory.
-o, --output The Ballerina files will be generated at the same location from which the AsyncAPI command is executed. Optionally, you can point to another directory location by using the optional flag (-o\|--output).