Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revved the InvokeRestApi task to support multiple connection types #7617

Merged
merged 1 commit into from
Jul 3, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
"loc.description": "Invoke REST API as a part of your process.",
"loc.instanceNameFormat": "Invoke REST API: $(method)",
"loc.group.displayName.completionOptions": "Advanced",
"loc.input.label.connectedServiceNameSelector": "Connection type",
"loc.input.help.connectedServiceNameSelector": "Select the service connection type to use to invoke the REST API.",
"loc.input.label.connectedServiceName": "Generic service connection",
"loc.input.help.connectedServiceName": "Select a generic service connection that should be used to pick the URL and construct authorization header for the http request.",
"loc.input.label.connectedServiceNameARM": "Azure subscription",
"loc.input.help.connectedServiceNameARM": "Select an Azure Resource Manager subscription that should be used to pick the url and construct authorization header for the http request.",
"loc.input.label.method": "Method",
"loc.input.help.method": "Select the HTTP method with which the API should be invoked.",
"loc.input.label.headers": "Headers",
Expand Down
30 changes: 27 additions & 3 deletions Tasks/InvokeRestApiV1/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 2
"Patch": 3
},
"instanceNameFormat": "Invoke REST API: $(method)",
"groups": [{
Expand All @@ -27,15 +27,39 @@
}
],
"inputs": [
{
"name": "connectedServiceNameSelector",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name and label should be consistence. name: connectionType

"aliases": ["connectionType"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aliases not required

"type": "pickList",
"label": "Connection type",
"required": true,
"helpMarkDown": "Select the service connection type to use to invoke the REST API.",
"defaultValue": "connectedServiceName",
"options": {
"connectedServiceName": "Generic",
"connectedServiceNameARM": "Azure Resource Manager"
}
},
{
"name": "connectedServiceName",
"aliases": ["serviceConnection"],
"type": "connectedService:Generic",
"label": "Generic service connection",
"defaultValue": "",
"required": "true",
"helpMarkDown": "Select a generic service connection that should be used to pick the URL and construct authorization header for the http request."
"helpMarkDown": "Select a generic service connection that should be used to pick the URL and construct authorization header for the http request.",
"visibleRule": "connectedServiceNameSelector = connectedServiceName"
},
{
"name": "connectedServiceNameARM",
"aliases": ["azureServiceConnection"],
"type": "connectedService:AzureRM",
"label": "Azure subscription",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select an Azure Resource Manager subscription that should be used to pick the url and construct authorization header for the http request.",
"visibleRule": "connectedServiceNameSelector = connectedServiceNameARM"
},
{
"name": "method",
"type": "pickList",
Expand Down Expand Up @@ -116,7 +140,7 @@
"execution": {
"HttpRequest": {
"Execute": {
"EndpointId":"$(connectedServiceName)",
"EndpointId":"TaskInputs[TaskInputs['connectedServiceNameSelector']]",
"EndpointUrl": "$(endpoint.url)$(urlSuffix)",
"Method": "$(method)",
"Body": "$(body)",
Expand Down
34 changes: 31 additions & 3 deletions Tasks/InvokeRestApiV1/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 0,
"Patch": 2
"Patch": 3
},
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"groups": [
Expand All @@ -28,6 +28,21 @@
}
],
"inputs": [
{
"name": "connectedServiceNameSelector",
"aliases": [
"connectionType"
],
"type": "pickList",
"label": "ms-resource:loc.input.label.connectedServiceNameSelector",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.connectedServiceNameSelector",
"defaultValue": "connectedServiceName",
"options": {
"connectedServiceName": "Generic",
"connectedServiceNameARM": "Azure Resource Manager"
}
},
{
"name": "connectedServiceName",
"aliases": [
Expand All @@ -37,7 +52,20 @@
"label": "ms-resource:loc.input.label.connectedServiceName",
"defaultValue": "",
"required": "true",
"helpMarkDown": "ms-resource:loc.input.help.connectedServiceName"
"helpMarkDown": "ms-resource:loc.input.help.connectedServiceName",
"visibleRule": "connectedServiceNameSelector = connectedServiceName"
},
{
"name": "connectedServiceNameARM",
"aliases": [
"azureServiceConnection"
],
"type": "connectedService:AzureRM",
"label": "ms-resource:loc.input.label.connectedServiceNameARM",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.connectedServiceNameARM",
"visibleRule": "connectedServiceNameSelector = connectedServiceNameARM"
},
{
"name": "method",
Expand Down Expand Up @@ -118,7 +146,7 @@
"execution": {
"HttpRequest": {
"Execute": {
"EndpointId": "$(connectedServiceName)",
"EndpointId": "TaskInputs[TaskInputs['connectedServiceNameSelector']]",
"EndpointUrl": "$(endpoint.url)$(urlSuffix)",
"Method": "$(method)",
"Body": "$(body)",
Expand Down