Skip to content

ballerina-platform/openapi-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ballerina-OpenAPI

Build codecov GitHub Last Commit GitHub issues

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.

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.

  2. 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.

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.

Code of Conduct

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

Useful Links

About

Ballerina OpenApi-Tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 62