Skip to content

Commit

Permalink
Fill plan properties in Http Headers and ServiceBus Message Propertie…
Browse files Browse the repository at this point in the history
…s instead of body and increased the major version. (#6238)

* Fill plan properties in Http Headers and ServiceBus Message Properties instead of body and increased the major version.

* correct function spelling

* mark headers as not mandatory fields
  • Loading branch information
sureshtadisetty authored Jan 18, 2018
1 parent c108bfb commit de36681
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 169 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"loc.input.label.key": "Function key",
"loc.input.help.key": "Function or Host key with which we can access this function. To keep the key secure, define a secret variable and use it here. Example: - $(myFunctionKey) where myFunctionKey is an environment level secret variable with value as the secret key like ZxPXnIEODXLRzYwCw1TgZ4osMfoKs9Zn6se6X/N0FnztfDvZbdOmYw==",
"loc.input.label.method": "Method",
"loc.input.help.method" : "Select the http method with which the funtion should be invoked with.",
"loc.input.help.method": "Select the http method with which the function should be invoked with.",
"loc.input.label.headers": "Headers",
"loc.input.help.headers": "Define header in JSON format. The header shall be attached with request to be sent.",
"loc.input.label.queryParameters": "Query parameters",
Expand All @@ -18,6 +18,6 @@
"loc.input.help.body": "JSON formatted message body for the request.",
"loc.input.label.waitForCompletion": "Completion event",
"loc.input.help.waitForCompletion": "Default value \"ApiResponse\". Available values : \"ApiResponse\", \"Callback\" call where the Azure function calls back to update the timeline record​.",
"loc.input.label.successCriteria": "Success criteria",
"loc.input.help.successCriteria": "Criteria which defines when to pass the task. No criteria means response content does not influence the result. Example:- For response {\"status\" : \"successful\"}, the expression can be eq(root['status'], 'successful'). [More Information](https://go.microsoft.com/fwlink/?linkid=842996)"
"loc.input.label.successCriteria": "Success criteria",
"loc.input.help.successCriteria": "Criteria which defines when to pass the task. No criteria means response content does not influence the result. Example:- For response {\"status\" : \"successful\"}, the expression can be eq(root['status'], 'successful'). [More Information](https://go.microsoft.com/fwlink/?linkid=842996)"
}
12 changes: 6 additions & 6 deletions Tasks/AzureFunction/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"ServerGate"
],
"version": {
"Major": 0,
"Major": 1,
"Minor": 0,
"Patch": 5
"Patch": 0
},
"instanceNameFormat": "Azure Function: $(function)",
"groups": [{
Expand Down Expand Up @@ -56,17 +56,17 @@
"TRACE": "TRACE",
"PATCH": "PATCH"
},
"helpMarkDown": "Select the http method with which the funtion should be invoked with."
"helpMarkDown": "Select the http method with which the function should be invoked with."
}, {
"name": "headers",
"type": "multiLine",
"label": "Headers",
"required": "false",
"defaultValue": "{\n\"Content-Type\":\"application/json\"\n}",
"defaultValue": "{\n\"Content-Type\":\"application/json\", \n\"PlanUrl\": \"$(system.CollectionUri)\", \n\"ProjectId\": \"$(system.TeamProjectId)\", \n\"HubName\": \"$(system.HostType)\", \n\"PlanId\": \"$(system.PlanId)\", \n\"JobId\": \"$(system.JobId)\", \n\"TimelineId\": \"$(system.TimelineId)\", \n\"TaskInstanceId\": \"$(system.TaskInstanceId)\", \n\"AuthToken\": \"$(system.AccessToken)\"\n}",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "500"
"rows": "10",
"maxLength": "2000"
},
"helpMarkDown": "Define header in JSON format. The header shall be attached with request to be sent."
}, {
Expand Down
266 changes: 137 additions & 129 deletions Tasks/AzureFunction/task.loc.json
Original file line number Diff line number Diff line change
@@ -1,129 +1,137 @@
{
"id": "537FDB7A-A601-4537-AA70-92645A2B5CE4",
"name": "AzureFunction",
"friendlyName": "ms-resource:loc.friendlyName",
"description": "ms-resource:loc.description",
"author": "Microsoft Corporation",
"helpMarkDown": "ms-resource:loc.helpMarkDown",
"category": "Tool",
"preview": "true",
"visibility": [
"Release"
],
"runsOn": [
"Server",
"ServerGate"
],
"version": {
"Major": 0,
"Minor": 0,
"Patch": 5
},
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"groups": [{
"name": "completionOptions",
"displayName": "ms-resource:loc.group.displayName.completionOptions",
"isExpanded": false
}
],
"inputs": [{
"name": "function",
"type": "string",
"label": "ms-resource:loc.input.label.function",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.function"
}, {
"name": "key",
"type": "string",
"label": "ms-resource:loc.input.label.key",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.key"
}, {
"name": "method",
"type": "pickList",
"label": "ms-resource:loc.input.label.method",
"required": "true",
"defaultValue": "POST",
"options": {
"OPTIONS": "OPTIONS",
"GET": "GET",
"HEAD": "HEAD",
"POST": "POST",
"PUT": "PUT",
"DELETE": "DELETE",
"TRACE": "TRACE",
"PATCH": "PATCH"
},
"helpMarkDown": "ms-resource:loc.input.help.method"
}, {
"name": "headers",
"type": "multiLine",
"label": "ms-resource:loc.input.label.headers",
"required": "false",
"defaultValue": "{\n\"Content-Type\":\"application/json\"\n}",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "500"
},
"helpMarkDown": "ms-resource:loc.input.help.headers"
}, {
"name": "queryParameters",
"type": "string",
"label": "ms-resource:loc.input.label.queryParameters",
"defaultValue": "",
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.queryParameters"
}, {
"name": "body",
"type": "multiLine",
"label": "ms-resource:loc.input.label.body",
"required": "false",
"defaultValue": "",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "2000"
},
"visibleRule": "method != GET && method != HEAD",
"helpMarkDown": "ms-resource:loc.input.help.body"
}, {
"name": "waitForCompletion",
"type": "pickList",
"label": "ms-resource:loc.input.label.waitForCompletion",
"defaultValue": "false",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.waitForCompletion",
"groupName": "completionOptions",
"options": {
"true": "Callback",
"false": "ApiResponse"
}
}, {
"name": "successCriteria",
"type": "string",
"label": "ms-resource:loc.input.label.successCriteria",
"defaultValue": "",
"required": false,
"groupName": "completionOptions",
"visibleRule": "waitForCompletion = false",
"helpMarkDown": "ms-resource:loc.input.help.successCriteria"
}
],

"execution": {
"HttpRequest": {
"Execute": {
"EndpointId": "",
"EndpointUrl": "$(function)?code=$(key)&$(queryParameters)",
"Method": "$(method)",
"Body": "$(body)",
"Headers": "$(headers)",
"WaitForCompletion": "$(waitForCompletion)",
"Expression": "$(successCriteria)"
}
}
}
}
{
"id": "537FDB7A-A601-4537-AA70-92645A2B5CE4",
"name": "AzureFunction",
"friendlyName": "ms-resource:loc.friendlyName",
"description": "ms-resource:loc.description",
"author": "Microsoft Corporation",
"helpMarkDown": "ms-resource:loc.helpMarkDown",
"category": "Utility",
"preview": "true",
"visibility": [
"Release"
],
"runsOn": [
"Server",
"ServerGate"
],
"version": {
"Major": 1,
"Minor": 0,
"Patch": 0
},
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"groups": [
{
"name": "completionOptions",
"displayName": "ms-resource:loc.group.displayName.completionOptions",
"isExpanded": false
}
],
"inputs": [
{
"name": "function",
"type": "string",
"label": "ms-resource:loc.input.label.function",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.function"
},
{
"name": "key",
"type": "string",
"label": "ms-resource:loc.input.label.key",
"defaultValue": "",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.key"
},
{
"name": "method",
"type": "pickList",
"label": "ms-resource:loc.input.label.method",
"required": "true",
"defaultValue": "POST",
"options": {
"OPTIONS": "OPTIONS",
"GET": "GET",
"HEAD": "HEAD",
"POST": "POST",
"PUT": "PUT",
"DELETE": "DELETE",
"TRACE": "TRACE",
"PATCH": "PATCH"
},
"helpMarkDown": "ms-resource:loc.input.help.method"
},
{
"name": "headers",
"type": "multiLine",
"label": "ms-resource:loc.input.label.headers",
"required": "false",
"defaultValue": "{\n\"Content-Type\":\"application/json\", \n\"PlanUrl\": \"$(system.CollectionUri)\", \n\"ProjectId\": \"$(system.TeamProjectId)\", \n\"HubName\": \"$(system.HostType)\", \n\"PlanId\": \"$(system.PlanId)\", \n\"JobId\": \"$(system.JobId)\", \n\"TimelineId\": \"$(system.TimelineId)\", \n\"TaskInstanceId\": \"$(system.TaskInstanceId)\", \n\"AuthToken\": \"$(system.AccessToken)\"\n}",
"properties": {
"resizable": "true",
"rows": "10",
"maxLength": "2000"
},
"helpMarkDown": "ms-resource:loc.input.help.headers"
},
{
"name": "queryParameters",
"type": "string",
"label": "ms-resource:loc.input.label.queryParameters",
"defaultValue": "",
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.queryParameters"
},
{
"name": "body",
"type": "multiLine",
"label": "ms-resource:loc.input.label.body",
"required": "false",
"defaultValue": "",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "2000"
},
"visibleRule": "method != GET && method != HEAD",
"helpMarkDown": "ms-resource:loc.input.help.body"
},
{
"name": "waitForCompletion",
"type": "pickList",
"label": "ms-resource:loc.input.label.waitForCompletion",
"defaultValue": "false",
"required": true,
"helpMarkDown": "ms-resource:loc.input.help.waitForCompletion",
"groupName": "completionOptions",
"options": {
"true": "Callback",
"false": "ApiResponse"
}
},
{
"name": "successCriteria",
"type": "string",
"label": "ms-resource:loc.input.label.successCriteria",
"defaultValue": "",
"required": false,
"helpMarkDown": "ms-resource:loc.input.help.successCriteria",
"groupName": "completionOptions",
"visibleRule": "waitForCompletion = false"
}
],
"execution": {
"HttpRequest": {
"Execute": {
"EndpointId": "",
"EndpointUrl": "$(function)?code=$(key)&$(queryParameters)",
"Method": "$(method)",
"Body": "$(body)",
"Headers": "$(headers)",
"WaitForCompletion": "$(waitForCompletion)",
"Expression": "$(successCriteria)"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"loc.group.displayName.completionOptions": "Advanced",
"loc.input.label.connectedServiceName": "Generic endpoint",
"loc.input.help.connectedServiceName": "Select a generic endpoint that should be used to pick the url and construct authorization header for the http request.",
"loc.input.label.urlSuffix": "Url suffix and parameters",
"loc.input.help.urlSuffix": "Given string append to the url. Example: If endpoint url is https:...TestProj/_apis/Release/releases and url suffix is /2/environments/1, endpoint url becomes https:.../TestProj/_apis/Release/releases/2/environments/1. If url suffix is ?definitionId=1&releaseCount=1 then endpoint url becomes https//...TestProj/_apis/Release/releases?definitionId=1&releaseCount=1.",
"loc.input.label.method": "Method",
"loc.input.help.method": "Select the http method with which the API should be invoked with.",
"loc.input.label.headers": "Headers",
"loc.input.help.headers": "Define header in JSON format. The header shall be attached with request to be sent.",
"loc.input.label.body": "Body",
"loc.input.label.waitForCompletion": "Completion event",
"loc.input.label.urlSuffix": "Url suffix and parameters",
"loc.input.help.urlSuffix": "Given string append to the url. Example: If endpoint url is https:...TestProj/_apis/Release/releases and url suffix is /2/environments/1, endpoint url becomes https:.../TestProj/_apis/Release/releases/2/environments/1. If url suffix is ?definitionId=1&releaseCount=1 then endpoint url becomes https//...TestProj/_apis/Release/releases?definitionId=1&releaseCount=1.",
"loc.input.label.waitForCompletion": "Completion event",
"loc.input.help.waitForCompletion": "Default value \"ApiResponse\". Available values : \"ApiResponse\", \"Callback\" call where the REST API calls back to update the timeline record​.",
"loc.input.label.successCriteria": "Success criteria",
"loc.input.help.successCriteria": "Criteria which defines when to pass the task. No criteria means response content does not influence the result. Example:- For response {\"status\" : \"successful\"}, the expression can be eq(root['status'], 'successful'). [More Information](https://go.microsoft.com/fwlink/?linkid=842996)​"
Expand Down
10 changes: 5 additions & 5 deletions Tasks/InvokeRestApi/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"ServerGate"
],
"version": {
"Major": 0,
"Major": 1,
"Minor": 0,
"Patch": 8
"Patch": 0
},
"instanceNameFormat": "Invoke REST API: $(method)",
"groups": [{
Expand Down Expand Up @@ -59,11 +59,11 @@
"type":"multiLine",
"label":"Headers",
"required":"false",
"defaultValue":"{\n\"Content-Type\":\"application/json\"\n}",
"defaultValue": "{\n\"Content-Type\":\"application/json\", \n\"PlanUrl\": \"$(system.CollectionUri)\", \n\"ProjectId\": \"$(system.TeamProjectId)\", \n\"HubName\": \"$(system.HostType)\", \n\"PlanId\": \"$(system.PlanId)\", \n\"JobId\": \"$(system.JobId)\", \n\"TimelineId\": \"$(system.TimelineId)\", \n\"TaskInstanceId\": \"$(system.TaskInstanceId)\", \n\"AuthToken\": \"$(system.AccessToken)\"\n}",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "500"
"rows": "10",
"maxLength": "2000"
},
"helpMarkDown": "Define header in JSON format. The header shall be attached with request to be sent."
},
Expand Down
10 changes: 5 additions & 5 deletions Tasks/InvokeRestApi/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"ServerGate"
],
"version": {
"Major": 0,
"Major": 1,
"Minor": 0,
"Patch": 8
"Patch": 0
},
"instanceNameFormat": "ms-resource:loc.instanceNameFormat",
"groups": [
Expand Down Expand Up @@ -62,11 +62,11 @@
"type": "multiLine",
"label": "ms-resource:loc.input.label.headers",
"required": "false",
"defaultValue": "{\n\"Content-Type\":\"application/json\"\n}",
"defaultValue": "{\n\"Content-Type\":\"application/json\", \n\"PlanUrl\": \"$(system.CollectionUri)\", \n\"ProjectId\": \"$(system.TeamProjectId)\", \n\"HubName\": \"$(system.HostType)\", \n\"PlanId\": \"$(system.PlanId)\", \n\"JobId\": \"$(system.JobId)\", \n\"TimelineId\": \"$(system.TimelineId)\", \n\"TaskInstanceId\": \"$(system.TaskInstanceId)\", \n\"AuthToken\": \"$(system.AccessToken)\"\n}",
"properties": {
"resizable": "true",
"rows": "3",
"maxLength": "500"
"rows": "10",
"maxLength": "2000"
},
"helpMarkDown": "ms-resource:loc.input.help.headers"
},
Expand Down
Loading

0 comments on commit de36681

Please sign in to comment.