Skip to content

SkNuwanTissera/ballerinax-openapi-connectors

 
 

Repository files navigation

Ballerinax Open API Connectors

Build Build GitHub Last Commit License

This repository manages the connectors generated using Ballerina OpenAPI tool while providing the capability to build and publish generated connectors to Ballerina Central.

Steps to add new connector

Set up the prerequisites

  • Download and install the latest Ballerina version from here.
  • Set the BALLERINA_HOME environment variable to the ballerina distribution directory. eg. /usr/lib/ballerina
  • Fork and Clone the repository

Generate the connector

  1. Navigate to /openapi directory and run bal new <connector_name> -t lib to create a new Ballerina project
  2. Copy the OpenAPI yaml/json definition file of the API you wish to generate the connector to the <connector_name> directory.
  3. Run bal openapi -i <openap_file_name> --mode client to generate the connector.
  4. Run bal build to check whether the newly generated connector is compiling successfully.
  5. Run necessary unit tests to verify the functionality of the generated connector.

Add connector to the repository

  1. Run ./gradlew build.
  2. Push the changes and create a Pull Request to the master branch of the ballerinax-openapi-connector repository.

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.

License

Ballerina code is distributed under Apache license 2.0.

Useful links