Skip to main content

Create from OpenAPI Spec

WSO2 Integrator can generate a fully functional connector from any OpenAPI specification file, letting you integrate any REST API without writing manual client logic. Import the spec in the WSO2 Integrator IDE and the generated connector is ready to use in your integration.

Prerequisites

  • An OpenAPI specification file (JSON or YAML) for the target API
  • WSO2 Integrator IDE installed and configured

Generate a connector

Follow these steps to generate a custom connector from an OpenAPI spec and create a connection from it.

Step 1: Add a connection from the Artifacts view

Open your integration and select Connection from the Artifacts view.

Add a connection from the Artifacts view

Step 2: Select Connect via API Specification

In the Add Connection dialog, select Connect via API Specification.

Select Connect via API Specification in the Add Connection dialog

Step 3: Configure and import the specification

Fill in the connector configuration fields, then save to import the specification.

FieldDescriptionExample
Connector NameA descriptive name for the generated connector.stackOverflow
Import Specification FileBrowse and select your OpenAPI specification file in JSON or YAML format.stack-overflow-api.yaml

Configure the connector and import the OpenAPI specification

tip

Make sure your OpenAPI specification is valid and well-structured before importing. You can validate your spec using tools like Swagger Editor.

Step 4: Create the connection

After you select Save in the previous step, WSO2 Integrator generates the connector from the specification and moves you to the Create Connection step of the Connect via API Specification wizard. Complete this step to create a connection with the name you provided. The connection is then available in the Flow Diagram editor for any integration in the project.

Create the connection in the Connect via API Specification wizard

Add a connection while building a flow

You don't have to start from the Artifacts view. While you work in the Flow Diagram editor, open the node palette with the + button and select Add Connection to start the same Connect via API Specification wizard without leaving your integration.

Add a connection from the node palette in the Flow Diagram editor

What's next