From 9de859d2e45f316f53ee30bfbb3c3c0e7b788dd3 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Mon, 7 Feb 2022 17:32:53 +0800 Subject: [PATCH 1/3] Add swagger for script activity --- .../2018-06-01/entityTypes/Pipeline.json | 140 ++++++++++++++++++ .../entityTypes/Pipeline.json | 140 ++++++++++++++++++ .../2020-12-01/entityTypes/Pipeline.json | 140 ++++++++++++++++++ 3 files changed, 420 insertions(+) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json index 1bbe83bbe342..fad170472a5b 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json @@ -7363,6 +7363,146 @@ } } }, + "ScriptActivity": { + "description": "Script activity type.", + "x-ms-discriminator-value": "Script", + "allOf": [ + { + "$ref": "#/definitions/ExecutionActivity" + } + ], + "properties": { + "typeProperties": { + "x-ms-client-flatten": true, + "description": "Script activity properties.", + "$ref": "#/definitions/ScriptActivityTypeProperties" + } + }, + "required": [ + "typeProperties", + "linkedServiceName" + ] + }, + "ScriptActivityTypeProperties": { + "description": "Script activity properties.", + "properties": { + "scripts": { + "type": "array", + "description": "Array of script blocks. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityScriptBlock" + } + }, + "logSettings": { + "description": "Log settings of script activity.", + "properties": { + "logDestination": { + "x-ms-enum": { + "name": "ScriptActivityLogDestination", + "modelAsString": true + }, + "enum": [ + "ActivityOutput", + "ExternalStore" + ], + "type": "string", + "description": "The destination of logs. Type: string." + }, + "logLocationSettings": { + "description": "Log location settings customer needs to provide when enabling log.", + "$ref": "#/definitions/LogLocationSettings" + } + }, + "required": [ + "logDestination" + ] + } + } + }, + "ScriptActivityScriptBlock": { + "description": "Script block of scripts.", + "properties": { + "text": { + "type": "object", + "description": "The query text. Type: string (or Expression with resultType string)." + }, + "type": { + "x-ms-enum": { + "name": "ScriptType", + "modelAsString": true + }, + "enum": [ + "Query", + "NonQuery" + ], + "type": "string", + "description": "The type of the query. Type: string." + }, + "parameters": { + "type": "array", + "description": "Array of script parameters. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityParameter" + } + } + }, + "required": [ + "text", + "type" + ] + }, + "ScriptActivityParameter": { + "description": "Parameters of a script block.", + "properties": { + "name": { + "type": "object", + "description": "The name of the parameter. Type: string (or Expression with resultType string)." + }, + "type": { + "description": "The type of the parameter.", + "type": "string", + "enum": [ + "Boolean", + "DateTime", + "DateTimeOffset", + "Decimal", + "Double", + "Guid", + "Int16", + "Int32", + "Int64", + "Single", + "String", + "Timespan" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterType", + "modelAsString": true + } + }, + "value": { + "description": "The value of the parameter.", + "type": "object" + }, + "direction": { + "description": "The direction of the parameter.", + "type": "string", + "enum": [ + "Input", + "Output", + "InputOutput" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterDirection", + "modelAsString": true + } + }, + "size": { + "description": "The size of the output direction parameter.", + "type": "integer" + } + } + }, "SharePointOnlineListSource": { "description": "A copy activity source for sharePoint online list source.", "type": "object", diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json index 7c9801518e66..cd797ceee4a6 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json @@ -7050,6 +7050,146 @@ "dataflow" ] }, + "ScriptActivity": { + "description": "Script activity type.", + "x-ms-discriminator-value": "Script", + "allOf": [ + { + "$ref": "#/definitions/ExecutionActivity" + } + ], + "properties": { + "typeProperties": { + "x-ms-client-flatten": true, + "description": "Script activity properties.", + "$ref": "#/definitions/ScriptActivityTypeProperties" + } + }, + "required": [ + "typeProperties", + "linkedServiceName" + ] + }, + "ScriptActivityTypeProperties": { + "description": "Script activity properties.", + "properties": { + "scripts": { + "type": "array", + "description": "Array of script blocks. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityScriptBlock" + } + }, + "logSettings": { + "description": "Log settings of script activity.", + "properties": { + "logDestination": { + "x-ms-enum": { + "name": "ScriptActivityLogDestination", + "modelAsString": true + }, + "enum": [ + "ActivityOutput", + "ExternalStore" + ], + "type": "string", + "description": "The destination of logs. Type: string." + }, + "logLocationSettings": { + "description": "Log location settings customer needs to provide when enabling log.", + "$ref": "#/definitions/LogLocationSettings" + } + }, + "required": [ + "logDestination" + ] + } + } + }, + "ScriptActivityScriptBlock": { + "description": "Script block of scripts.", + "properties": { + "text": { + "type": "object", + "description": "The query text. Type: string (or Expression with resultType string)." + }, + "type": { + "x-ms-enum": { + "name": "ScriptType", + "modelAsString": true + }, + "enum": [ + "Query", + "NonQuery" + ], + "type": "string", + "description": "The type of the query. Type: string." + }, + "parameters": { + "type": "array", + "description": "Array of script parameters. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityParameter" + } + } + }, + "required": [ + "text", + "type" + ] + }, + "ScriptActivityParameter": { + "description": "Parameters of a script block.", + "properties": { + "name": { + "type": "object", + "description": "The name of the parameter. Type: string (or Expression with resultType string)." + }, + "type": { + "description": "The type of the parameter.", + "type": "string", + "enum": [ + "Boolean", + "DateTime", + "DateTimeOffset", + "Decimal", + "Double", + "Guid", + "Int16", + "Int32", + "Int64", + "Single", + "String", + "Timespan" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterType", + "modelAsString": true + } + }, + "value": { + "description": "The value of the parameter.", + "type": "object" + }, + "direction": { + "description": "The direction of the parameter.", + "type": "string", + "enum": [ + "Input", + "Output", + "InputOutput" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterDirection", + "modelAsString": true + } + }, + "size": { + "description": "The size of the output direction parameter.", + "type": "integer" + } + } + }, "SharePointOnlineListSource": { "description": "A copy activity source for sharePoint online list source.", "type": "object", diff --git a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json index c6ff16345cf3..3e1cc7ade5b4 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json @@ -7080,6 +7080,146 @@ "dataflow" ] }, + "ScriptActivity": { + "description": "Script activity type.", + "x-ms-discriminator-value": "Script", + "allOf": [ + { + "$ref": "#/definitions/ExecutionActivity" + } + ], + "properties": { + "typeProperties": { + "x-ms-client-flatten": true, + "description": "Script activity properties.", + "$ref": "#/definitions/ScriptActivityTypeProperties" + } + }, + "required": [ + "typeProperties", + "linkedServiceName" + ] + }, + "ScriptActivityTypeProperties": { + "description": "Script activity properties.", + "properties": { + "scripts": { + "type": "array", + "description": "Array of script blocks. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityScriptBlock" + } + }, + "logSettings": { + "description": "Log settings of script activity.", + "properties": { + "logDestination": { + "x-ms-enum": { + "name": "ScriptActivityLogDestination", + "modelAsString": true + }, + "enum": [ + "ActivityOutput", + "ExternalStore" + ], + "type": "string", + "description": "The destination of logs. Type: string." + }, + "logLocationSettings": { + "description": "Log location settings customer needs to provide when enabling log.", + "$ref": "#/definitions/LogLocationSettings" + } + }, + "required": [ + "logDestination" + ] + } + } + }, + "ScriptActivityScriptBlock": { + "description": "Script block of scripts.", + "properties": { + "text": { + "type": "object", + "description": "The query text. Type: string (or Expression with resultType string)." + }, + "type": { + "x-ms-enum": { + "name": "ScriptType", + "modelAsString": true + }, + "enum": [ + "Query", + "NonQuery" + ], + "type": "string", + "description": "The type of the query. Type: string." + }, + "parameters": { + "type": "array", + "description": "Array of script parameters. Type: array.", + "items": { + "$ref": "#/definitions/ScriptActivityParameter" + } + } + }, + "required": [ + "text", + "type" + ] + }, + "ScriptActivityParameter": { + "description": "Parameters of a script block.", + "properties": { + "name": { + "type": "object", + "description": "The name of the parameter. Type: string (or Expression with resultType string)." + }, + "type": { + "description": "The type of the parameter.", + "type": "string", + "enum": [ + "Boolean", + "DateTime", + "DateTimeOffset", + "Decimal", + "Double", + "Guid", + "Int16", + "Int32", + "Int64", + "Single", + "String", + "Timespan" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterType", + "modelAsString": true + } + }, + "value": { + "description": "The value of the parameter.", + "type": "object" + }, + "direction": { + "description": "The direction of the parameter.", + "type": "string", + "enum": [ + "Input", + "Output", + "InputOutput" + ], + "x-ms-enum": { + "name": "ScriptActivityParameterDirection", + "modelAsString": true + } + }, + "size": { + "description": "The size of the output direction parameter.", + "type": "integer" + } + } + }, "SharePointOnlineListSource": { "description": "A copy activity source for sharePoint online list source.", "type": "object", From 2e6cbef95e35c2cc2bbf1024b362937f219a2493 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Mon, 7 Feb 2022 19:08:57 +0800 Subject: [PATCH 2/3] Resolve issues --- .../stable/2018-06-01/entityTypes/Pipeline.json | 14 +++++++++++--- .../2021-06-01-preview/entityTypes/Pipeline.json | 14 +++++++++++--- .../stable/2020-12-01/entityTypes/Pipeline.json | 14 +++++++++++--- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json index fad170472a5b..daa87a06686d 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json @@ -7366,6 +7366,7 @@ "ScriptActivity": { "description": "Script activity type.", "x-ms-discriminator-value": "Script", + "type": "object", "allOf": [ { "$ref": "#/definitions/ExecutionActivity" @@ -7385,16 +7386,19 @@ }, "ScriptActivityTypeProperties": { "description": "Script activity properties.", + "type": "object", "properties": { "scripts": { "type": "array", "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - } + }, + "x-ms-identifiers": [] }, "logSettings": { "description": "Log settings of script activity.", + "type": "object", "properties": { "logDestination": { "x-ms-enum": { @@ -7421,6 +7425,7 @@ }, "ScriptActivityScriptBlock": { "description": "Script block of scripts.", + "type": "object", "properties": { "text": { "type": "object", @@ -7443,7 +7448,8 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - } + }, + "x-ms-identifiers": [] } }, "required": [ @@ -7453,6 +7459,7 @@ }, "ScriptActivityParameter": { "description": "Parameters of a script block.", + "type": "object", "properties": { "name": { "type": "object", @@ -7499,7 +7506,8 @@ }, "size": { "description": "The size of the output direction parameter.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json index cd797ceee4a6..32b08ba4909a 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json @@ -7053,6 +7053,7 @@ "ScriptActivity": { "description": "Script activity type.", "x-ms-discriminator-value": "Script", + "type": "object", "allOf": [ { "$ref": "#/definitions/ExecutionActivity" @@ -7072,16 +7073,19 @@ }, "ScriptActivityTypeProperties": { "description": "Script activity properties.", + "type": "object", "properties": { "scripts": { "type": "array", "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - } + }, + "x-ms-identifiers": [] }, "logSettings": { "description": "Log settings of script activity.", + "type": "object", "properties": { "logDestination": { "x-ms-enum": { @@ -7108,6 +7112,7 @@ }, "ScriptActivityScriptBlock": { "description": "Script block of scripts.", + "type": "object", "properties": { "text": { "type": "object", @@ -7130,7 +7135,8 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - } + }, + "x-ms-identifiers": [] } }, "required": [ @@ -7140,6 +7146,7 @@ }, "ScriptActivityParameter": { "description": "Parameters of a script block.", + "type": "object", "properties": { "name": { "type": "object", @@ -7186,7 +7193,8 @@ }, "size": { "description": "The size of the output direction parameter.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, diff --git a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json index 3e1cc7ade5b4..ab7dd0bf3d8d 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json @@ -7083,6 +7083,7 @@ "ScriptActivity": { "description": "Script activity type.", "x-ms-discriminator-value": "Script", + "type": "object", "allOf": [ { "$ref": "#/definitions/ExecutionActivity" @@ -7102,16 +7103,19 @@ }, "ScriptActivityTypeProperties": { "description": "Script activity properties.", + "type": "object", "properties": { "scripts": { "type": "array", "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - } + }, + "x-ms-identifiers": [] }, "logSettings": { "description": "Log settings of script activity.", + "type": "object", "properties": { "logDestination": { "x-ms-enum": { @@ -7138,6 +7142,7 @@ }, "ScriptActivityScriptBlock": { "description": "Script block of scripts.", + "type": "object", "properties": { "text": { "type": "object", @@ -7160,7 +7165,8 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - } + }, + "x-ms-identifiers": [] } }, "required": [ @@ -7170,6 +7176,7 @@ }, "ScriptActivityParameter": { "description": "Parameters of a script block.", + "type": "object", "properties": { "name": { "type": "object", @@ -7216,7 +7223,8 @@ }, "size": { "description": "The size of the output direction parameter.", - "type": "integer" + "type": "integer", + "format": "int32" } } }, From f006fcd9c9a7b15d694c55e9bd851bb455515f96 Mon Sep 17 00:00:00 2001 From: Zhenquan Xu Date: Tue, 8 Feb 2022 11:44:56 +0800 Subject: [PATCH 3/3] remove x-ms-identifier --- .../stable/2018-06-01/entityTypes/Pipeline.json | 6 ++---- .../preview/2021-06-01-preview/entityTypes/Pipeline.json | 6 ++---- .../stable/2020-12-01/entityTypes/Pipeline.json | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json index daa87a06686d..4943c38da86a 100644 --- a/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json +++ b/specification/datafactory/resource-manager/Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json @@ -7393,8 +7393,7 @@ "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - }, - "x-ms-identifiers": [] + } }, "logSettings": { "description": "Log settings of script activity.", @@ -7448,8 +7447,7 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - }, - "x-ms-identifiers": [] + } } }, "required": [ diff --git a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json index 32b08ba4909a..790078c907cf 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/preview/2021-06-01-preview/entityTypes/Pipeline.json @@ -7080,8 +7080,7 @@ "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - }, - "x-ms-identifiers": [] + } }, "logSettings": { "description": "Log settings of script activity.", @@ -7135,8 +7134,7 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - }, - "x-ms-identifiers": [] + } } }, "required": [ diff --git a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json index ab7dd0bf3d8d..fbc4761ce067 100644 --- a/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json +++ b/specification/synapse/data-plane/Microsoft.Synapse/stable/2020-12-01/entityTypes/Pipeline.json @@ -7110,8 +7110,7 @@ "description": "Array of script blocks. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityScriptBlock" - }, - "x-ms-identifiers": [] + } }, "logSettings": { "description": "Log settings of script activity.", @@ -7165,8 +7164,7 @@ "description": "Array of script parameters. Type: array.", "items": { "$ref": "#/definitions/ScriptActivityParameter" - }, - "x-ms-identifiers": [] + } } }, "required": [