Before you can use an OpenAPI connector in a process, you must import an OpenAPI specification and select the API operations that should be exposed as connector actions.
The OpenAPI specification can be provided as a JSON or YAML file, or through a URL that points to the specification. During the import process, Studio Modeler generates connector actions based on the selected API operations and creates a companion .openapi.json extension file that stores runtime configuration and metadata.
To configure the OpenAPI connector:
After the connector is created, the imported API operations are available as connector actions (each OpenAPI operation is turned into one connector action), request and parameter metadata is stored in the extension file, authentication rules coming from components.securitySchemes are applied according to the imported configuration, and actions can be used within processes like any other connector action.
An example follows:
{
"openapi": "3.0.3",
"sourceUrl": "https://petstore.example.com/openapi.json",
"servers": [{ "url": "https://api.petstore.example.com/v1" }],
"actions": {
"listPets": {
"path": "/pets",
"method": "get",
"inputs": {
"limit": { "in": "query", "style": "form", "explode": false }
}
}
}
}