CLI tool for Connector Generation.
Generates API-First Connectors with a specified name based on provided API definition.
API-First Connector is an SDK that expose a set of functions for communiaction with third party API.
Table of Contents
- How To Install?
- How To Generate Connector?
- How To Refresh Connector?
- Supported API Definitions
How To Install?
Both the CLI and generated project have dependencies that require
Node 8.9.1 or higher, together with
NPM 5 or higher.
- Install globally
npm i connector-builder -g
NOTE: if you have any issue due to the installation process, you can use
sudocommand. It is needed in case of installing
npm modulesin default folders that need permission. You may need to fill your administrator password. Please find additional information on the following link sudo
As a result you should have
connector-builder command in your terminal.
How to Update the CLI
If you're using old CLI version, you need to uninstall
connector-builder package and to install it globally again:
npm uninstall -g connector-buildernpm install -g connector-builder
How to Generate Connector?
To list the available options run:
Using Interactive Wizard
Will start a step by step wizard for filling the necessary information for connector generation.
- Provide the name of the connector you want to generate - the naming convention is to use
appc.like prefix and lowercase letters e.g.
- Provide the URL or the path (absolute or relative) to the API definition - e.g.
- Select the Connector Type - there are two given options Cloud Elements or Open API.
- Enter the absolute path to the location where the connector will be generated (leave empty for current dir) - by default the connector will be generated in your current directory in its own folder otherwise you could specify the location where the connector must be generated.
- Do you want to remove previous connector if it is already exist - there are two options
After the above steps you will have successfully generated connector.
Available is a second approach for the generation of a new connector. You need to set all required parameters and connector type. Please find the examples below.
name - the connector name
api - path or URL to the API definition
type - defines the specifics of API definition and how the connector talks to the underlying service. Please find available connector types below.
dest - the absolute path to the directory where the connector will be generated
Available Connector Types
openapi - generates connector based on Open API Definitions and standard
Examples of the generation options
Valid flag values:
--name- the connector name. Cannot be an empty string, space or cannot have unallowed special characters except
__api- url or path to the swagger definition file (absolute or relative)
--type- describe the type of the service connector. Two available options: ce (Cloud Elements connector) or openapi (Open API Definitions)
- standard generation with no overwrite in the current directory:
connector-builder --name [Connector Name] --api [Path or URL to the API Definition] --type [Connector Type]
- standard generation with overwrite in the current directory:
connector-builder --name [Connector Name] --api [Path or URL to the API Definition] --type [Connector Type] --force
- generation with default connector type with no overwrite in the current directory:
connector-builder --name [Connector Name] --api [Path or URL of the API Definition]
- generation with default connector type with overwrite in the current directory:
connector-builder --name [Connector Name] --api [Path or URL of the API Definition] --force
- generation with default connector type with no overwrite in specified directory:
connector-builder --name [Connector Name] --api [Path or URL of the API Definition] --dest [Absolute Path]
How To Refresh Connector?
If you need to generate the connector again due to changes or if there is more recent versions of your API, please update the content of config/swagger.json file and you can regenerate it via refresh functionality. You won't lose any test data from your Test Suite. Please follow the steps below:
- navigate to the root directory of the connector
- execute the
As a result, you should have successfully regenerated connector
Supported API Definitions
Currently supported standards are:
The files describing the RESTful API in accordance with the Swagger specification are represented as JSON objects and conform to the JSON standards
This code is closed source and Confidential and Proprietary to Axway, Inc. All Rights Reserved. This code MUST not be modified, copied or otherwise redistributed without express written permission of Axway. This file is licensed as part of the Axway Platform and governed under the terms of the Axway license agreement. Your right to use this software terminates when you terminate your Axway subscription.