Ballerina OpenAPI tools provide seamless integration between Ballerina and OpenAPI specifications, enabling both
contract-first and code-first API development approaches. The bal openapi command offers contract optimization
through flatten and align operations to make OpenAPI contracts Ballerina-compatible, bidirectional code generation
to create Ballerina services and clients from OpenAPI contracts or export OpenAPI specifications from Ballerina
services, and build-time integration via the add command for automated client generation. Additionally,
the OpenAPI module provides annotations like @openapi:ServiceInfo, @openapi:ResourceInfo, and @openapi:Example
to enrich generated contracts with metadata, enable runtime introspection by exposing OpenAPI documentation, validate
service implementations against existing contracts at compile-time, and enhance API documentation with examples and
descriptions.
- 
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. 
- 
Export GitHub Personal access token with read package permissions as follows, export packageUser=<Username> export packagePAT=<Personal access token>
Execute the commands below to build from the source.
- 
To build the library: ./gradlew clean build
- 
To run the integration tests: ./gradlew clean test
- 
To build the module without the tests: ./gradlew clean build -x test
- 
To publish to maven local: ./gradlew clean build publishToMavenLocal
As an open-source project, Ballerina welcomes contributions from the community.
You can also check for open issues that interest you. We look forward to receiving your contributions.
For more information, go to the contribution guidelines.
All contributors are encouraged to read the Ballerina Code of Conduct.
- Discuss about code changes of the Ballerina project in ballerina-dev@googlegroups.com.
- Chat live with us via our Discord server.
- Post all technical questions on Stack Overflow with the #ballerina tag.
- View the Ballerina performance test results.