x-ntx-connection-validation

Use the x-ntx-connection-validation Specification Extension to validate your connection when it is created, rather than when it is first used. Connections that aren't validated may fail when the action is being configured by the workflow designer (if the action uses dynamic fields) or when the workflow first runs.

Example: The workflow designer mistypes the password when they create a basic auth connection for an action that does not use dynamic fields. If the connection is not validated, the workflow fails when it runs. If the connection is validated, the workflow designer is informed of the problem when they create the connection, and can correct it.

How to use x-ntx-connection-validation

  1. Define the operation that validates the connection in your OpenAPI Specification.
  2. Note: The operation must not require any additional parameters other than what the user specifies when the connection is created.

  3. Identify the operation with an operationID and hide it using "x-ntx-visibility": "internal".
  4. Inside the security definition, add the x-ntx-connection-validation object.
  5. Inside x-ntx-connection-validation, add the operationID of the validation endpoint.

Where to use x-ntx-connection-validation

Use x-ntx-connection-validation inside the security definition.

 
{
  "paths": {
    "/validateConnection": {
      "get": {
        "operationId": "validateSecurity",
        "security": [ {"basicAuth": [] } ],
        "x-ntx-visibility": "internal",
        "responses": {
          "200": {"description": "OK"},
          "401": {"description": "Unauthorized."}
        }
      }
    }
  },
  "securityDefinitions": {
    "basicAuth": {
      "type": "basic",
      "x-ntx-connection-validation": {
        "operationId": "validateSecurity"
      }
    } 
  }						
}