{
  "$schema": "https://json-schema.org/draft-04/schema#",
  "id": "https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-connection/pipeline-connection-v2-schema.json",
  "title": "Watson Data Platform Pipeline Connection Schema",
  "description": "Connection schema for pipelines in the Watson Data Platform",
  "definitions": {
    "common_pipeline_connection_def": {
      "description": "Details of the connection to use for a pipeline binding node.",
      "properties": {
        "name": {
          "description": "A name tag for disambiguating connections",
          "type": "string"
        },
        "app_data": {
          "$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"
        },
        "ref": {
          "description": "A reference to a connection by ID.",
          "type": "string"
        },
        "catalog_ref": {
          "description": "If ref is set, this refers to the ID of the catalog which contains the connection. If neither this attribute nor project_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",
          "type": "string"
        },
        "project_ref": {
          "description": "If ref is set, this refers to the ID of the project which contains the connection. If neither this attribute nor catalog_ref are specified, the connection will be assumed to exist in the project or catalog which contains the pipeline.",
          "type": "string"
        },
        "properties": {
          "description": "The properties for the connection. The specific properties allowed depend on the type of connection referenced.",
          "additionalProperties": {
            "type": "object"
          },
          "type": "object"
        }
      },
      "required": [
        "ref"
      ],
      "type": "object"
    },
    "common_pipeline_data_asset_def": {
      "description": "Details of the data asset contained in a catalog or project to use for a pipeline binding node.",
      "properties": {
        "app_data": {
          "$ref": "https://api.dataplatform.ibm.com/schemas/common-pipeline/pipeline-flow/pipeline-flow-v2-schema.json#/definitions/app_data_def"
        },
        "ref": {
          "description": "A reference to a data asset by ID.",
          "type": "string"
        },
        "catalog_ref": {
          "description": "If ref is set, this refers to the ID of the catalog which contains the data asset. If neither this attribute nor project_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",
          "type": "string"
        },
        "project_ref": {
          "description": "If ref is set, this refers to the ID of the project which contains the data asset. If neither this attribute nor catalog_ref are specified, the data asset will be assumed to exist in the project or catalog which contains the pipeline.",
          "type": "string"
        },
        "properties": {
          "description": "Properties controlling how the data asset is used.",
          "type": "object",
          "additionalProperties": {
            "type": "object"
          },
          "properties": {
            "attachment_ref": {
              "description": "The ID of the data asset attachment to use. If not specified and used as a source, the first suitable attachment found will be used. If not specified and used as a target, a new attachment will be created.",
              "type": "string"
            },
            "name": {
              "description": "Specifies the name of the data asset to read, create or update if ref is unset.",
              "type": "string",
              "default": false
            },
            "no_write_schema": {
              "description": "When used as a target, whether to update the data asset with the schema when a run completes or not (will be automatically updated if not supplied by caller).",
              "type": "boolean",
              "default": false
            },
            "no_write_status": {
              "description": "When used as a target, whether to update the data asset with the status when a run completes or not (will be automatically updated if not supplied by caller).",
              "type": "boolean",
              "default": false
            }
          }
        }
      },
      "type": "object"
    }
  }
}
