Generating API Client Code

OpenAPI provides over fifty client generators that can help developers generate client code from any specification file. This document will provide a step-to-step guide for generating an API client library using the Connectivity OpenAPI specification. In this example, a java client will be generated, but you can choose your own programming language here.


  1. Any suitable IDE
  2. Java 1.8+
  3. Maven (3.8.3+)

Locate and download the Specs

Locate the OpenApi Specification on the top right-hand section in Holidu Developer Hub website for access to the latest versions of all Connectivity API specification files.

Click on the Connectivity API-v2.0 to access the spec content

Create a .json file in the resource folder of your project and copy the content of the selected spec into the created file.

Generate client code

We will use the openApi codegen maven pluggin. as a code generator in this guide (for information about other generators, visit Simply update the build section of your pom.xml with the code snippet specified below.


A client API library will be generated during the generate phase of your build process.

For more information about configuration options associated with the openApi codegen maven pluggin visit

A compilation error might be thrown when trying to generate the client code. To resolve this, ensure your project contains the following artifacts:, io.swagger:swagger-annotations, com.squareup.okhttp3:okhttp-tls, com.squareup.okhttp3:logging-interceptor and io.gsonfire:gson-fire

The generated API client can be located in the target folder.

Find a file in the path indicated below for a comprehensive guide to using this generated API in your projects.