From 096acebaf12aa829106203b009172b6ecadba7f0 Mon Sep 17 00:00:00 2001 From: mablumen Date: Fri, 4 Oct 2019 14:19:04 -0700 Subject: [PATCH 1/4] Add Switch activity to public swagger. --- .../2018-06-01/entityTypes/Pipeline.json | 58 +++++++++++++++++++ 1 file changed, 58 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 6065b3591e7c..997f99e911eb 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 @@ -4803,6 +4803,64 @@ "expression" ] }, + "SwitchActivity": { + "x-ms-discriminator-value": "Switch", + "description": "This activity evaluates an expression and executes activities under the cases property that correspond to the expression evaluation expected in the equals property.", + "allOf": [ + { + "$ref": "#/definitions/ControlActivity" + } + ], + "properties": { + "typeProperties": { + "description": "Switch activity properties.", + "x-ms-client-flatten": true, + "$ref": "#/definitions/SwitchActivityTypeProperties" + } + }, + "required": [ + "typeProperties" + ] + }, + "SwitchActivityTypeProperties": { + "description": "Switch activity properties.", + "properties": { + "on": { + "description": "An expression that would evaluate to a string or integer. This is used to determine the block of activities in cases that will be executed.", + "$ref": "../datafactory.json#/definitions/Expression" + }, + "cases": { + "type": "array", + "description": "List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivites.", + "items": { + "$ref": "#/definitions/SwitchCase" + } + }, + "defaultActivities": { + "type": "array", + "description": "List of activities to execute if no case condition is satisfied. This is an optional property and if not provided, the activity will exit without any action.", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, + "required": [ + "on" + ] + }, + "SwitchCase": { + "equals": { + "description": "Expected value that satisfies the expression result of the 'on' property.", + "type": "string" + }, + "activities": { + "type": "array", + "description": "List of activities to execute for satisfied case condition.", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, "ForEachActivity": { "x-ms-discriminator-value": "ForEach", "description": "This activity is used for iterating over a collection and execute given activities.", From 9b9002a8704f025e7db7f5a2a657b30aae331fc3 Mon Sep 17 00:00:00 2001 From: mablumen Date: Fri, 4 Oct 2019 14:27:36 -0700 Subject: [PATCH 2/4] Update public swagger for Switch activity. --- .../stable/2018-06-01/entityTypes/Pipeline.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 997f99e911eb..e9fae2a6f67a 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 @@ -4833,6 +4833,7 @@ "type": "array", "description": "List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivites.", "items": { + "x-ms-client-flatten": true, "$ref": "#/definitions/SwitchCase" } }, @@ -4849,7 +4850,7 @@ ] }, "SwitchCase": { - "equals": { + "value": { "description": "Expected value that satisfies the expression result of the 'on' property.", "type": "string" }, From 26ae52d7229ba92706a0e3bf7de99675152ee3df Mon Sep 17 00:00:00 2001 From: mablumen Date: Fri, 4 Oct 2019 16:07:32 -0700 Subject: [PATCH 3/4] Correct spelling issue. --- .../stable/2018-06-01/entityTypes/Pipeline.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e9fae2a6f67a..35cbbaf8344b 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 @@ -4831,7 +4831,7 @@ }, "cases": { "type": "array", - "description": "List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivites.", + "description": "List of cases that correspond to expected values of the 'on' property. This is an optional property and if not provided, the activity will execute activities provided in defaultActivities.", "items": { "x-ms-client-flatten": true, "$ref": "#/definitions/SwitchCase" From fd6a275f03e5798adf417af89e742f7deba79557 Mon Sep 17 00:00:00 2001 From: mablumen Date: Mon, 7 Oct 2019 10:36:56 -0700 Subject: [PATCH 4/4] Add description to SwitchCase. --- .../2018-06-01/entityTypes/Pipeline.json | 21 +++++++++++-------- 1 file changed, 12 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 35cbbaf8344b..3e2d02967950 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 @@ -4850,15 +4850,18 @@ ] }, "SwitchCase": { - "value": { - "description": "Expected value that satisfies the expression result of the 'on' property.", - "type": "string" - }, - "activities": { - "type": "array", - "description": "List of activities to execute for satisfied case condition.", - "items": { - "$ref": "#/definitions/Activity" + "description": "Switch cases with have a value and corresponding activities.", + "properties": { + "value": { + "description": "Expected value that satisfies the expression result of the 'on' property.", + "type": "string" + }, + "activities": { + "type": "array", + "description": "List of activities to execute for satisfied case condition.", + "items": { + "$ref": "#/definitions/Activity" + } } } },