x-ntx-connection-properties

Use the x-ntx-connection-properties Specification Extension to:

  • Add additional properties a designer can specify when creating a new connection The stored authorization credentials for a connector., such as a database path.
  • Override the labels of existing connection properties to make them more closely match what the designer may expect for that connection.
  • Create placeholders for connection-specific information such as hosts or basePaths.

How to use x-ntx-connection-properties

  1. Add the key x-ntx-connection-properties to one of the security definitions in your securityDefinitions object.
  2. Define x-ntx-connection-properties as an object, with the properties you want to add or override.
  3. Add an array to the x-ntx-connection-proprieties object with a key of required.
  4. Add the names of each x-ntx-connection-properties property you have defined that you want to make mandatory. Separate multiple properties by commas.

Where to use x-ntx-connection-properties

Use x-ntx-connection-properties inside one of the security definition objects in the securityDefinitions object of your OpenAPI Specification.


"securityDefinitions": {
  "basicAuth": {
    "type": "basic",
    "x-ntx-connection-properties": {
      "type": "object",
      "properties": {
        "subdomain": {
          "type": "string",
          "title": "Subdomain",
          "description": "Example: mydomain"
        },
        "accountId": {
          "type": "string",
          "title": "Account ID"
        }
      },
      "required": ["subdomain", "accountId"]
    }
  }
}
 

Using placeholders

You can use properties you define in x-ntx-connection-properties as variables in your OpenAPI Specification by using placeholders. To use a placeholder, add the name of the x-ntx-connection-properties property in {{double braces}} as the value.

Note: 

Not all specification extensions support using connection-property placeholders. Placeholders are supported in the following specification extensions:

{
  "host": "login.example.com",
  "basePath": "/",
  "x-ntx-basePath": "/{{accountId}}",
  "securityDefinitions": {
    "basicAuth": {
      "type": "basic",
      "x-ntx-connection-properties": {
        "type": "object",
        "properties": {
          "accountId": {
            "type": "string",
            "title": "Account ID"
          }
        },
        "required": ["accountId"]
      }
    }
  }
}