MCPcopy Index your code
hub / github.com/ballerina-platform/asyncapi-tools

github.com/ballerina-platform/asyncapi-tools @v0.12.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.12.0 ↗ · + Follow
1,098 symbols 3,902 edges 162 files 349 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ballerina AsyncAPI Tools

Build GitHub Last Commit GitHub issues

The AsyncAPI Specification is a specification, which creates an event driven architecture based contract for APIs detailing all of its resources and channels in both human and machine-readable format for easy development, discovery, and integration. AsyncAPI tools currently s the following capabilities.

  1. Generate Ballerina client code from a given AsyncAPI contract with http and ws protocols.
  2. Export the AsyncAPI definition of a Ballerina service using the ws protocol.
  3. The asyncapi command in Ballerina is used for AsyncAPI to Ballerina and Ballerina to AsyncAPI code generations.

The asyncapi command in Ballerina is used for AsyncAPI to Ballerina and Ballerina to AsyncAPI code generations.

Building from the Source

Setting Up the Prerequisites

  1. OpenJDK 21 (Adopt OpenJDK or any other OpenJDK distribution)

Info: You can also use Oracle JDK. Set the JAVA_HOME environment variable to the pathname of the directory into which you installed JDK.

  1. Export GitHub Personal access token with read package permissions as follows, export packageUser=<Username> export packagePAT=<Personal access token>

Building the Source

Execute the commands below to build from the source.

  1. To build the library:

    ./gradlew clean build
    
  2. To run the integration tests:

    ./gradlew clean test
    
  3. To build the module without the tests:

    ./gradlew clean build -x test
    
  4. To publish to maven local:

    ./gradlew clean build publishToMavenLocal
    

Contributing to Ballerina

As an open-source project, Ballerina welcomes contributions from the community.

For more information, go to the contribution guidelines.

Code of Conduct

All contributors are encouraged to read the Ballerina Code of Conduct.

Useful Links

Extension points exported contracts — how you extend this code

BalController (Interface)
This is the Interface used for Ballerina code generation related Controllers. [8 implementers]
asyncapi-cli/src/main/java/io/ballerina/asyncapi/codegenerator/controller/BalController.java
Application (Interface)
This is the interface of the application, Async API CMD class uses this interface. [7 implementers]
asyncapi-cli/src/main/java/io/ballerina/asyncapi/codegenerator/application/Application.java
Extractor (Interface)
Interface for the use cases related to the data extraction from the AsyncAPI specification. [8 implementers]
asyncapi-cli/src/main/java/io/ballerina/asyncapi/codegenerator/usecase/Extractor.java
Generator (Interface)
Interface for the use cases related to the Ballerina code generation. [11 implementers]
asyncapi-cli/src/main/java/io/ballerina/asyncapi/codegenerator/usecase/Generator.java
AsyncApiConverterDiagnostic (Interface)
This AsyncAPIConverterDiagnostic represents diagnostic type in the ballerina to AsyncApi command. [4 implementers]
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/asyncspec/diagnostic/AsyncApiConverterDiagnostic.java

Core symbols most depended-on inside this repo

toString
called by 113
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/asyncspec/Constants.java
toString
called by 108
asyncapi-cli/src/main/java/io/ballerina/asyncapi/cmd/websockets/CmdConstants.java
normalizeAsyncAPI
called by 89
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/GeneratorUtils.java
getType
called by 84
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/model/GenSrcFile.java
generateSyntaxTree
called by 66
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/schema/BallerinaTypesGenerator.java
setType
called by 48
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/model/GenSrcFile.java
getFileContentFromResources
called by 46
asyncapi-cli/src/main/java/io/ballerina/asyncapi/codegenerator/repository/FileRepository.java
getMessage
called by 45
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/asyncspec/diagnostic/AsyncApiConverterDiagnostic.java

Shape

Method 928
Class 156
Interface 8
Enum 6

Languages

Java100%

Modules by API surface

asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/client/IntermediateClientGenerator.java51 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/client/BallerinaAuthConfigGenerator.java34 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/GeneratorUtils.java24 symbols
asyncapi-cli/src/test/java/io/ballerina/asyncapi/cmd/AsyncApiCmdTest.java23 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/client/UtilGenerator.java22 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/asyncspec/service/AsyncApiComponentMapper.java20 symbols
asyncapi-cli/src/test/java/io/ballerina/asyncapi/wsgenerators/asyncapi/ResponseTests.java19 symbols
asyncapi-cli/src/test/java/io/ballerina/asyncapi/wsgenerators/asyncapi/AsyncApiConverterUtilsTest.java19 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/asyncspec/service/AsyncApiResponseMapper.java19 symbols
asyncapi-cli/src/test/java/io/ballerina/asyncapi/wsgenerators/asyncapi/HeaderTests.java18 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/cmd/AsyncApiCmd.java18 symbols
asyncapi-cli/src/main/java/io/ballerina/asyncapi/websocketscore/generators/schema/TypeGeneratorUtils.java17 symbols

For agents

$ claude mcp add asyncapi-tools \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page