{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-create-pipeline-schema.json",
  "title": "createPipeline",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-document-grounding-openapi.yml#/components/schemas/createPipeline",
  "oneOf": [
    {
      "$ref": "#/$defs/MSSharePointPipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/S3PipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/SFTPPipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/SDMPipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/WorkZonePipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/ServiceNowPipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/GoogleDrivePipelineCreateRequest"
    },
    {
      "$ref": "#/$defs/MetadataConfiguration"
    }
  ],
  "$defs": {
    "DataRepositoryMetaDataStrict": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/MetaDataKeyValuePairStrict"
      }
    },
    "GoogleDriveConfig": {
      "type": "object",
      "required": [
        "resourceType"
      ],
      "properties": {
        "resourceType": {
          "type": "string",
          "enum": [
            "SHARED_FOLDER",
            "SHARED_DRIVE"
          ]
        },
        "resourceId": {
          "type": "string"
        },
        "includePaths": {
          "$ref": "#/$defs/IncludePathsArray"
        }
      },
      "additionalProperties": true
    },
    "GoogleDriveConfigurationStruct": {
      "type": "object",
      "required": [
        "destination",
        "googleDrive"
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "googleDrive": {
          "$ref": "#/$defs/GoogleDriveConfig"
        },
        "cronExpression": {
          "type": "string",
          "description": "Optional cron expression for scheduling pipeline execution.\nMust represent an interval greater than 1 hour.\n"
        },
        "metadataConfigId": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "GoogleDrivePipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "configuration"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "GoogleDrive"
          ]
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        },
        "configuration": {
          "$ref": "#/$defs/GoogleDriveConfigurationStruct"
        }
      }
    },
    "IncludePathsArray": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "MSSharePointConfiguration": {
      "type": "object",
      "required": [
        "destination",
        "sharePoint"
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "sharePoint": {
          "$ref": "#/$defs/SharePointConfig"
        },
        "cronExpression": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "MSSharePointPipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "configuration"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "MSSharePoint"
          ]
        },
        "configuration": {
          "$ref": "#/$defs/MSSharePointConfiguration"
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        }
      },
      "additionalProperties": true
    },
    "MetaData": {
      "type": "object",
      "properties": {
        "destination": {
          "type": "string"
        },
        "dataRepositoryMetadata": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "key": {
                "type": "string",
                "minLength": 1,
                "maxLength": 1024,
                "nullable": false
              },
              "value": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 1024,
                  "nullable": false
                },
                "nullable": false,
                "minItems": 1
              }
            },
            "required": [
              "key",
              "value"
            ]
          }
        }
      },
      "additionalProperties": true
    },
    "MetaDataKeyValuePairStrict": {
      "type": "object",
      "properties": {
        "key": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1024,
          "nullable": false
        },
        "value": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024,
            "nullable": false
          },
          "nullable": false,
          "minItems": 1
        }
      },
      "required": [
        "key",
        "value"
      ],
      "additionalProperties": true
    },
    "MetadataConfiguration": {
      "type": "object",
      "required": [
        "type",
        "configuration"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "metadata"
          ]
        },
        "configuration": {
          "$ref": "#/$defs/MetadataConfigurationStruct"
        },
        "metadata": {
          "type": "object",
          "properties": {
            "dataRepositoryMetadata": {
              "$ref": "#/$defs/DataRepositoryMetaDataStrict"
            }
          },
          "required": [
            "dataRepositoryMetadata"
          ]
        }
      },
      "additionalProperties": true
    },
    "MetadataConfigurationStruct": {
      "type": "object",
      "properties": {
        "metadataConfigId": {
          "type": "string",
          "minLength": 1
        },
        "cronExpression": {
          "type": "string",
          "description": "Optional cron expression for scheduling pipeline execution.\nMust represent an interval greater than 1 hour.\n"
        }
      },
      "required": [
        "metadataConfigId"
      ],
      "additionalProperties": true
    },
    "S3Configuration": {
      "type": "object",
      "required": [
        "destination"
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "s3": {
          "type": "object",
          "properties": {
            "includePaths": {
              "$ref": "#/$defs/IncludePathsArray"
            }
          }
        },
        "cronExpression": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "S3PipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "configuration"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "S3"
          ]
        },
        "configuration": {
          "$ref": "#/$defs/S3Configuration"
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        }
      },
      "additionalProperties": true
    },
    "SDMPipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "metadata"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "SDM"
          ]
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        }
      },
      "additionalProperties": true
    },
    "SFTPConfiguration": {
      "type": "object",
      "required": [
        "destination"
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "sftp": {
          "type": "object",
          "properties": {
            "includePaths": {
              "$ref": "#/$defs/IncludePathsArray"
            }
          }
        },
        "cronExpression": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "SFTPPipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "configuration"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "SFTP"
          ]
        },
        "configuration": {
          "$ref": "#/$defs/SFTPConfiguration"
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        }
      },
      "additionalProperties": true
    },
    "ServiceNowConfig": {
      "type": "object",
      "properties": {
        "includePaths": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "minItems": 1
        }
      },
      "additionalProperties": true
    },
    "ServiceNowConfigurationStruct": {
      "type": "object",
      "required": [
        "destination"
      ],
      "properties": {
        "destination": {
          "type": "string"
        },
        "serviceNow": {
          "$ref": "#/$defs/ServiceNowConfig"
        },
        "metadataConfigId": {
          "type": "string"
        },
        "cronExpression": {
          "type": "string",
          "description": "Optional cron expression for scheduling pipeline execution.\nMust represent an interval greater than 1 hour.\n"
        }
      },
      "additionalProperties": true
    },
    "ServiceNowPipelineCreateRequest": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "ServiceNow"
          ]
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        },
        "configuration": {
          "$ref": "#/$defs/ServiceNowConfigurationStruct"
        }
      },
      "additionalProperties": true
    },
    "SharePointConfig": {
      "type": "object",
      "required": [
        "site"
      ],
      "properties": {
        "site": {
          "$ref": "#/$defs/SharePointSite"
        }
      },
      "additionalProperties": true
    },
    "SharePointSite": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "includePaths": {
          "$ref": "#/$defs/IncludePathsArray"
        }
      },
      "additionalProperties": true
    },
    "WorkZonePipelineCreateRequest": {
      "type": "object",
      "required": [
        "type",
        "metadata"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "WorkZone"
          ]
        },
        "metadata": {
          "$ref": "#/$defs/MetaData"
        }
      },
      "additionalProperties": true
    }
  }
}