Creating a Service Connector from a Swagger JSON File
Creating a Service Connector from a Swagger JSON File
You can import a Swagger 2.0 JSON file to easily create a service connector with multiple operations. Use the
New Service Connector from Swagger
wizard to import a Swagger JSON file and create a service connector. After you specify the Swagger JSON file, Application Integration parses the file and loads the operations.
If an error occurs during import, the wizard displays the error under
Error/Warnings
on the
Progress
tab. You can take corrective actions and import the Swagger JSON file again.
In
Application Integration
, click
New
on the left navigation bar.
The
New Asset
dialog box appears.
The following image shows the
New Asset
dialog box:
Click
Service Connectors
Service Connector from Swagger
, and then click
Create
.
The
New Service Connector from Swagger
dialog box appears with the
Swagger Source
tab open as shown in the following image:
Specify a name, location, and description for the service connector.
In the
Swagger File
section, use one of the following options to specify the Swagger JSON file that you want to import:
To use a Swagger JSON file from your local system, select
File
, and then select the Swagger JSON file.
To use a URL that contains a Swagger JSON file, select
URL
. The
Swagger URL
and
Use authentication
fields appear. In the
Swagger URL
field, enter the URL that contains the Swagger JSON file. Select the
Use authentication
option to specify the user name and password to access the Swagger JSON URL.
If the password contains an ampersand (&) character, when you test the service connector, the action fails. Additionally, if you use the same service connector in an app connection and process, the process invocation also fails.
Click
Next
.
The
Services and Operations
tab appears.
The following image shows the
Services and Operations
tab:
In the
Operations
section, select the operations that you want the service connector to provide.
The operations that you select will be available as actions when you create a process
and use the service connector.
Click
Next
.
The
Summary
tab appears.
The following image shows the
Summary
tab:
Review the service connector configuration.
Click
Start Import
.
Application Integration starts importing the Swagger JSON file and displays the status on the
Progress
tab. The
Progress
tab indicates whether the import completed successfully, failed, or completed with warnings.
The following image shows the
Progress
tab:
If you close the dialog box or cancel the import, the import process stops and the service connector is not created.
If the import fails or completes with warnings, click the
Error/Warnings
tab to understand why the import did not complete successfully. You can fix the issues and import the Swagger JSON file again.