The OpenAPI Specification is a specification, which creates a RESTFUL contract for APIs detailing all of its resources and operations in both human and machine-readable format for easy development, discovery, and integration. Ballerina OpenAPI tooling will make it easy for users to start the development of a service documented in the OpenAPI contract by generating the Ballerina service and client skeletons. The OpenAPI tools provide the following capabilities.
- Generate the Ballerina service or client code for a given OpenAPI definition.
- Export the OpenAPI definition of a Ballerina service.
- Validate the service implementation of a given OpenAPI contract.
The openapi
command in Ballerina is used for OpenAPI to Ballerina and Ballerina to OpenAPI code generations.
The OpenAPI compiler plugin will allow you to validate a service implementation against an OpenAPI contract during
compile time.
This plugin ensures that the implementation of a service does not deviate from its OpenAPI contract.
For more information on the supported operations, go to Using the OpenAPI Tools
-
OpenJDK 11 (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.