Introducing SwaggerHub Integrations

  April 07, 2016

SwaggerHub’s latest addition to its array of features is Integrations– A new way to drive your API lifecycle with connections into your existing toolset. Integrations are bits of software that can be added to your API definition to expand SwaggerHub’s functionality under your control. They can be found on the right of your API specification, as seen in the image below:

Add Integrations

SwaggerHub initially exposes two user Integrations - GitHub Sync and Webhooks.

GitHub Sync

GitHub Sync allows generated code to be automatically synchronized with your GitHub repository. That means, no more downloads, merging code, complicated configurations, or scripting. Simply specify the target to generate, the GitHub repository information, and file/folder information and your clients and servers will be always be up-to-date with your Swagger definition. Clients, servers alike can be pushed to one or many repositories. Swagger has 28 different clients and 13 server targets, generously contributed by experts in the Swagger Community. That means you can start providing client SDKs without an army of engineers to hand craft them. And since you control the synchronization process, you can still add additional logic into the SDKs without the worry of your changes being squashed by the generator.

GitHub Sync Integration

Check out this short screencast below to see how GitHub synchronization works. You can always read the feature documentation to learn more about the Integration.

Webhooks

Webhooks allow you to trigger your own services and integrations during the lifecycle events that you are interested in. When triggered, the Swagger definition is pushed to the service you define for a number of events. Whether triggering a build, a unit test, emailing your developers, or other, you can dream up automation scenarios with SwaggerHub Webhooks.

Webhooks Integrations

In the above example image, an HTTP POST payload is sent to Jenkins every time a version of your API is saved. Users can add multiple lifecycle events, and are returned a payload in JSON through either HTTP POST form-data or JSON bodies. Read the feature documentation to know more. Watch for more SwaggerHub Integrations in the near future to help make your API development fast and efficient!