diff --git a/function.json b/function.json index 05886bbda5..23a466e22d 100644 --- a/function.json +++ b/function.json @@ -1,20 +1,17 @@ { - "bindings": { - "input": [ - { - "type": "eventHubTrigger", - "connectionString": "%AzureWebJobsEventHubReceiver%", - "path": "%AzureWebJobsEventHubPath%" - } - ], - - "output": [ - { - "type": "eventHub", - "name" : "output", - "connectionString": "%AzureWebJobsEventHubSender%", - "path": "%AzureWebJobsEventHubPath%" - } - ] - } + "bindings": [ + { + "type": "eventHubTrigger", + "direction": "in", + "connectionString": "%AzureWebJobsEventHubReceiver%", + "path": "%AzureWebJobsEventHubPath%" + }, + { + "type": "eventHub", + "name": "output", + "direction": "out", + "connectionString": "%AzureWebJobsEventHubSender%", + "path": "%AzureWebJobsEventHubPath%" + } + ] } diff --git a/sample/BlobTrigger/function.json b/sample/BlobTrigger/function.json index 290b54c31e..64471435e4 100644 --- a/sample/BlobTrigger/function.json +++ b/sample/BlobTrigger/function.json @@ -1,10 +1,9 @@ { - "bindings": { - "input": [ - { - "type": "blobTrigger", - "path": "samples-workitems" - } - ] - } + "bindings": [ + { + "type": "blobTrigger", + "direction": "in", + "path": "samples-workitems" + } + ] } \ No newline at end of file diff --git a/sample/HttpTrigger-Batch/function.json b/sample/HttpTrigger-Batch/function.json index 6147943db3..70f79b1754 100644 --- a/sample/HttpTrigger-Batch/function.json +++ b/sample/HttpTrigger-Batch/function.json @@ -1,14 +1,12 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/sample/HttpTrigger/function.json b/sample/HttpTrigger/function.json index 6147943db3..70f79b1754 100644 --- a/sample/HttpTrigger/function.json +++ b/sample/HttpTrigger/function.json @@ -1,14 +1,12 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/sample/ManualTrigger/function.json b/sample/ManualTrigger/function.json index aaa2d05d7e..c236be393d 100644 --- a/sample/ManualTrigger/function.json +++ b/sample/ManualTrigger/function.json @@ -1,9 +1,8 @@ { - "bindings": { - "input": [ - { - "type": "manualTrigger" - } - ] - } + "bindings": [ + { + "type": "manualTrigger", + "direction": "in" + } + ] } diff --git a/sample/QueueTrigger-Bash/function.json b/sample/QueueTrigger-Bash/function.json index b43c65a870..8d744b2f76 100644 --- a/sample/QueueTrigger-Bash/function.json +++ b/sample/QueueTrigger-Bash/function.json @@ -1,10 +1,9 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-bash" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-bash" + } + ] } diff --git a/sample/QueueTrigger-Batch/function.json b/sample/QueueTrigger-Batch/function.json index 1ebd451c08..ef8b427f42 100644 --- a/sample/QueueTrigger-Batch/function.json +++ b/sample/QueueTrigger-Batch/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-batch" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "samples-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-batch" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "samples-output/{id}" + } + ] } diff --git a/sample/QueueTrigger-FSharp/function.json b/sample/QueueTrigger-FSharp/function.json index 185fbebbbc..5c9d791f40 100644 --- a/sample/QueueTrigger-FSharp/function.json +++ b/sample/QueueTrigger-FSharp/function.json @@ -1,10 +1,9 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-fsharp" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-fsharp" + } + ] } diff --git a/sample/QueueTrigger-Php/function.json b/sample/QueueTrigger-Php/function.json index d9e6c585ce..a530a4f418 100644 --- a/sample/QueueTrigger-Php/function.json +++ b/sample/QueueTrigger-Php/function.json @@ -1,10 +1,9 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-php" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-php" + } + ] } diff --git a/sample/QueueTrigger-Powershell/function.json b/sample/QueueTrigger-Powershell/function.json index 322caba94c..399d58db6d 100644 --- a/sample/QueueTrigger-Powershell/function.json +++ b/sample/QueueTrigger-Powershell/function.json @@ -1,19 +1,17 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-powershell" - } - ], - "output": [ - { - "type": "table", - "name": "output", - "tableName": "samples", - "partitionKey": "samples", - "rowKey": "%rand-guid%" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-powershell" + }, + { + "type": "table", + "name": "output", + "direction": "out", + "tableName": "samples", + "partitionKey": "samples", + "rowKey": "%rand-guid%" + } + ] } diff --git a/sample/QueueTrigger-Python/function.json b/sample/QueueTrigger-Python/function.json index b188fffd5d..1852907bab 100644 --- a/sample/QueueTrigger-Python/function.json +++ b/sample/QueueTrigger-Python/function.json @@ -1,25 +1,24 @@ { - "bindings": { - "input": [ + "bindings": [ { "type": "queueTrigger", + "direction": "in", "queueName": "samples-python" }, { "type": "table", "name": "input", + "direction": "in", "tableName": "samples", "partitionKey": "samples", "take": 5, "filter": "status eq '0'" - } - ], - "output": [ + }, { "type": "blob", "name": "output", + "direction": "out", "path": "samples-output/{id}" } - ] - } + ] } diff --git a/sample/QueueTrigger/function.json b/sample/QueueTrigger/function.json index ca57302dd5..41d304ca83 100644 --- a/sample/QueueTrigger/function.json +++ b/sample/QueueTrigger/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "samples-workitems" - } - ], - "output": [ - { - "type": "blob", - "name": "receipt", - "path": "samples-workitems/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "samples-workitems" + }, + { + "type": "blob", + "name": "receipt", + "direction": "out", + "path": "samples-workitems/{id}" + } + ] } diff --git a/sample/ResizeImage/function.json b/sample/ResizeImage/function.json index 4ce42fcfaf..90d90b86f7 100644 --- a/sample/ResizeImage/function.json +++ b/sample/ResizeImage/function.json @@ -1,22 +1,21 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "image-resize" - }, - { - "type": "blob", - "name": "original", - "path": "images-original/{name}" - } - ], - "output": [ - { - "type": "blob", - "name": "resized", - "path": "images-resized/{name}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "image-resize" + }, + { + "type": "blob", + "name": "original", + "direction": "in", + "path": "images-original/{name}" + }, + { + "type": "blob", + "name": "resized", + "direction": "out", + "path": "images-resized/{name}" + } + ] } \ No newline at end of file diff --git a/sample/ServiceBusQueueTrigger/function.json b/sample/ServiceBusQueueTrigger/function.json index 0a6d1684a8..bbb329fb00 100644 --- a/sample/ServiceBusQueueTrigger/function.json +++ b/sample/ServiceBusQueueTrigger/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "serviceBusTrigger", - "queueName": "samples-input" - } - ], - "output": [ - { - "type": "serviceBus", - "name": "message", - "queueName": "samples-input" - } - ] - } + "bindings": [ + { + "type": "serviceBusTrigger", + "direction": "in", + "queueName": "samples-input" + }, + { + "type": "serviceBus", + "name": "message", + "direction": "out", + "queueName": "samples-input" + } + ] } diff --git a/sample/TimerTrigger/function.json b/sample/TimerTrigger/function.json index f097514333..8f6c314996 100644 --- a/sample/TimerTrigger/function.json +++ b/sample/TimerTrigger/function.json @@ -1,18 +1,16 @@ { - "bindings": { - "input": [ - { - "type": "timerTrigger", - "schedule": "0 * * * * *", - "runOnStartup": true - } - ], - "output": [ - { - "type": "queue", - "name": "message", - "queueName": "samples-fsharp" - } - ] - } + "bindings": [ + { + "type": "timerTrigger", + "direction": "in", + "schedule": "0 * * * * *", + "runOnStartup": true + }, + { + "type": "queue", + "name": "message", + "direction": "out", + "queueName": "samples-fsharp" + } + ] } diff --git a/sample/WebHook-Generic/function.json b/sample/WebHook-Generic/function.json index ec6fbc6679..793ec366b7 100644 --- a/sample/WebHook-Generic/function.json +++ b/sample/WebHook-Generic/function.json @@ -1,15 +1,13 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger", - "webHookType": "genericJson" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in", + "webHookType": "genericJson" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/sample/WebHook-GitHub/function.json b/sample/WebHook-GitHub/function.json index 3e9060fc95..dbcece6144 100644 --- a/sample/WebHook-GitHub/function.json +++ b/sample/WebHook-GitHub/function.json @@ -1,15 +1,13 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger", - "webHookType": "github" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in", + "webHookType": "github" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/src/WebJobs.Script/Description/BindingDirection.cs b/src/WebJobs.Script/Description/BindingDirection.cs new file mode 100644 index 0000000000..fdf62c0695 --- /dev/null +++ b/src/WebJobs.Script/Description/BindingDirection.cs @@ -0,0 +1,12 @@ +// Copyright (c) .NET Foundation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. + +namespace Microsoft.Azure.WebJobs.Script.Description +{ + public enum BindingDirection + { + In, + Out, + InOut + } +} diff --git a/src/WebJobs.Script/Description/BindingMetadata.cs b/src/WebJobs.Script/Description/BindingMetadata.cs index 2b4938b2c1..d81d2008c5 100644 --- a/src/WebJobs.Script/Description/BindingMetadata.cs +++ b/src/WebJobs.Script/Description/BindingMetadata.cs @@ -7,7 +7,9 @@ public class BindingMetadata { public string Name { get; set; } - public BindingType Type { get;set; } + public BindingType Type { get; set; } + + public BindingDirection Direction { get; set; } public bool IsTrigger { diff --git a/src/WebJobs.Script/Description/FunctionMetadata.cs b/src/WebJobs.Script/Description/FunctionMetadata.cs index 1ec58682dc..dc8944eee2 100644 --- a/src/WebJobs.Script/Description/FunctionMetadata.cs +++ b/src/WebJobs.Script/Description/FunctionMetadata.cs @@ -1,7 +1,9 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. +using System.Collections.Generic; using System.Collections.ObjectModel; +using System.Linq; namespace Microsoft.Azure.WebJobs.Script.Description { @@ -9,8 +11,7 @@ public class FunctionMetadata { public FunctionMetadata() { - InputBindings = new Collection(); - OutputBindings = new Collection(); + Bindings = new Collection(); } public string Name { get; set; } @@ -19,8 +20,22 @@ public FunctionMetadata() public bool IsDisabled { get; set; } - public Collection InputBindings { get; private set; } + public Collection Bindings { get; private set; } - public Collection OutputBindings { get; private set; } + public IEnumerable InputBindings + { + get + { + return Bindings.Where(p => p.Direction != BindingDirection.Out); + } + } + + public IEnumerable OutputBindings + { + get + { + return Bindings.Where(p => p.Direction != BindingDirection.In); + } + } } } diff --git a/src/WebJobs.Script/Host/ScriptHost.cs b/src/WebJobs.Script/Host/ScriptHost.cs index e7a2ef7e76..2d1ed6000f 100644 --- a/src/WebJobs.Script/Host/ScriptHost.cs +++ b/src/WebJobs.Script/Host/ScriptHost.cs @@ -29,7 +29,7 @@ public class ScriptHost : JobHost private FileSystemWatcher _fileWatcher; private int _directoryCountSnapshot; - protected ScriptHost(ScriptHostConfiguration scriptConfig) + protected ScriptHost(ScriptHostConfiguration scriptConfig) : base(scriptConfig.HostConfig) { ScriptConfig = scriptConfig; @@ -153,12 +153,12 @@ protected virtual void Initialize() types.Add(type); ScriptConfig.HostConfig.TypeLocator = new TypeLocator(types); - + ApplyBindingConfiguration(functions, ScriptConfig.HostConfig); Functions = functions; } - + // Bindings may require us to update JobHostConfiguration. private static void ApplyBindingConfiguration(Collection functions, JobHostConfiguration hostConfig) { @@ -208,37 +208,18 @@ private static bool TryParseFunctionMetadata(string functionName, INameResolver }; JValue triggerDisabledValue = null; - JObject bindingsObject = (JObject)jObject["bindings"]; - if (bindingsObject != null) + JArray bindingArray = (JArray)jObject["bindings"]; + if (bindingArray != null) { - // parse input bindings - JArray bindingArray = (JArray)bindingsObject["input"]; - if (bindingArray != null) - { - foreach (JObject binding in bindingArray) - { - BindingMetadata bindingMetadata = null; - if (TryParseBindingMetadata(binding, nameResolver, out bindingMetadata)) - { - functionMetadata.InputBindings.Add(bindingMetadata); - if (bindingMetadata.IsTrigger) - { - triggerDisabledValue = (JValue)binding["disabled"]; - } - } - } - } - - // parse output bindings - bindingArray = (JArray)bindingsObject["output"]; - if (bindingArray != null) + foreach (JObject binding in bindingArray) { - foreach (JObject binding in bindingArray) + BindingMetadata bindingMetadata = null; + if (TryParseBindingMetadata(binding, nameResolver, out bindingMetadata)) { - BindingMetadata bindingMetadata = null; - if (TryParseBindingMetadata(binding, nameResolver, out bindingMetadata)) + functionMetadata.Bindings.Add(bindingMetadata); + if (bindingMetadata.IsTrigger) { - functionMetadata.OutputBindings.Add(bindingMetadata); + triggerDisabledValue = (JValue)binding["disabled"]; } } } @@ -258,8 +239,12 @@ private static bool TryParseBindingMetadata(JObject binding, INameResolver appse { bindingMetadata = null; string bindingTypeValue = (string)binding["type"]; + string bindingDirectionValue = (string)binding["direction"]; BindingType bindingType; - if (!string.IsNullOrEmpty(bindingTypeValue) && Enum.TryParse(bindingTypeValue, true, out bindingType)) + BindingDirection bindingDirection; + if (!string.IsNullOrEmpty(bindingTypeValue) && + Enum.TryParse(bindingTypeValue, true, out bindingType) && + Enum.TryParse(bindingDirectionValue, true, out bindingDirection)) { switch (bindingType) { @@ -295,7 +280,7 @@ private static bool TryParseBindingMetadata(JObject binding, INameResolver appse }; bindingMetadata.Type = bindingType; - + bindingMetadata.Direction = bindingDirection; appsettingResolver.ResolveAllProperties(bindingMetadata); diff --git a/src/WebJobs.Script/WebJobs.Script.csproj b/src/WebJobs.Script/WebJobs.Script.csproj index 97954df356..6d4f844092 100644 --- a/src/WebJobs.Script/WebJobs.Script.csproj +++ b/src/WebJobs.Script/WebJobs.Script.csproj @@ -167,6 +167,7 @@ + diff --git a/src/WebJobs.Script/packages.config b/src/WebJobs.Script/packages.config index fdbaf44b10..e2032528c9 100644 --- a/src/WebJobs.Script/packages.config +++ b/src/WebJobs.Script/packages.config @@ -1,28 +1,28 @@ - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + \ No newline at end of file diff --git a/test/WebJobs.Script.Tests/NodeFunctionGenerationTests.cs b/test/WebJobs.Script.Tests/NodeFunctionGenerationTests.cs index f3ba219d5b..f93d247290 100644 --- a/test/WebJobs.Script.Tests/NodeFunctionGenerationTests.cs +++ b/test/WebJobs.Script.Tests/NodeFunctionGenerationTests.cs @@ -174,7 +174,7 @@ private static MethodInfo GenerateMethod(BindingMetadata trigger) FunctionMetadata metadata = new FunctionMetadata(); metadata.Name = "Test"; metadata.Source = Path.Combine(rootPath, @"Node\Common\test.js"); - metadata.InputBindings.Add(trigger); + metadata.Bindings.Add(trigger); List metadatas = new List(); metadatas.Add(metadata); diff --git a/test/WebJobs.Script.Tests/TestScripts/Bash/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/Bash/QueueTriggerToBlob/function.json index 613513fc46..31721236c0 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Bash/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Bash/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/FSharp/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/FSharp/QueueTriggerToBlob/function.json index 613513fc46..31721236c0 100644 --- a/test/WebJobs.Script.Tests/TestScripts/FSharp/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/FSharp/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/EventHubSender/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/EventHubSender/function.json index ed6e31df6b..21f442eaf0 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/EventHubSender/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/EventHubSender/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "manualTrigger" - } - ], - "output": [ - { - "type": "eventHub", - "name" : "output", - "connectionString": "%AzureWebJobsEventHubSender%", - "path": "%AzureWebJobsEventHubPath%" - } - ] - } + "bindings": [ + { + "type": "manualTrigger", + "direction": "in" + }, + { + "type": "eventHub", + "name": "output", + "direction": "out", + "connectionString": "%AzureWebJobsEventHubSender%", + "path": "%AzureWebJobsEventHubPath%" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/EventHubTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/EventHubTrigger/function.json index e455fbc593..f0cdddcb08 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/EventHubTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/EventHubTrigger/function.json @@ -1,18 +1,16 @@ { - "bindings": { - "input": [ - { - "type": "eventHubTrigger", - "connectionString": "%AzureWebJobsEventHubReceiver%", - "path": "%AzureWebJobsEventHubPath%" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "eventHubTrigger", + "direction": "in", + "connectionString": "%AzureWebJobsEventHubReceiver%", + "path": "%AzureWebJobsEventHubPath%" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/HttpTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/HttpTrigger/function.json index 6147943db3..70f79b1754 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/HttpTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/HttpTrigger/function.json @@ -1,14 +1,12 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/ManualTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/ManualTrigger/function.json index aaa2d05d7e..c236be393d 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/ManualTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/ManualTrigger/function.json @@ -1,9 +1,8 @@ { - "bindings": { - "input": [ - { - "type": "manualTrigger" - } - ] - } + "bindings": [ + { + "type": "manualTrigger", + "direction": "in" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/QueueTriggerToBlob/function.json index 40054c3e2f..ebf475b612 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/TimerTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/TimerTrigger/function.json index cea2b5bf95..11f8c513b4 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/TimerTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/TimerTrigger/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "timerTrigger", - "schedule": "* * * * * *" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/testblob" - } - ] - } + "bindings": [ + { + "type": "timerTrigger", + "direction": "in", + "schedule": "* * * * * *" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/testblob" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Node/WebHookTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/Node/WebHookTrigger/function.json index ec6fbc6679..793ec366b7 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Node/WebHookTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Node/WebHookTrigger/function.json @@ -1,15 +1,13 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger", - "webHookType": "genericJson" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in", + "webHookType": "genericJson" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Php/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/Php/QueueTriggerToBlob/function.json index 613513fc46..31721236c0 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Php/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Php/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Powershell/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/Powershell/QueueTriggerToBlob/function.json index 40054c3e2f..ebf475b612 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Powershell/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Powershell/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/Python/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/Python/QueueTriggerToBlob/function.json index 40054c3e2f..ebf475b612 100644 --- a/test/WebJobs.Script.Tests/TestScripts/Python/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/Python/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/HttpTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/HttpTrigger/function.json index 6147943db3..70f79b1754 100644 --- a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/HttpTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/HttpTrigger/function.json @@ -1,14 +1,12 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in" + }, + { + "type": "http", + "direction": "out" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/QueueTriggerToBlob/function.json b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/QueueTriggerToBlob/function.json index 40054c3e2f..ebf475b612 100644 --- a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/QueueTriggerToBlob/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/QueueTriggerToBlob/function.json @@ -1,17 +1,15 @@ { - "bindings": { - "input": [ - { - "type": "queueTrigger", - "queueName": "test-input" - } - ], - "output": [ - { - "type": "blob", - "name": "output", - "path": "test-output/{id}" - } - ] - } + "bindings": [ + { + "type": "queueTrigger", + "direction": "in", + "queueName": "test-input" + }, + { + "type": "blob", + "name": "output", + "direction": "out", + "path": "test-output/{id}" + } + ] } diff --git a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/WebHookTrigger/function.json b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/WebHookTrigger/function.json index ec6fbc6679..793ec366b7 100644 --- a/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/WebHookTrigger/function.json +++ b/test/WebJobs.Script.Tests/TestScripts/WindowsBatch/WebHookTrigger/function.json @@ -1,15 +1,13 @@ { - "bindings": { - "input": [ - { - "type": "httpTrigger", - "webHookType": "genericJson" - } - ], - "output": [ - { - "type": "http" - } - ] - } + "bindings": [ + { + "type": "httpTrigger", + "direction": "in", + "webHookType": "genericJson" + }, + { + "type": "http", + "direction": "out" + } + ] }