From a18fd333acac622076f68ce6c98697b62d11bfa2 Mon Sep 17 00:00:00 2001 From: David OBrien Date: Fri, 23 Dec 2016 01:08:43 +1100 Subject: [PATCH 1/3] Add recursive search to GetModuleFilePaths so that modules can be maintained in folders. --- .../Description/PowerShell/PowerShellFunctionInvoker.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs b/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs index ccc000af09..0dd9575955 100644 --- a/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs +++ b/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs @@ -265,11 +265,14 @@ internal static List GetModuleFilePaths(string rootScriptPath, string fu if (Directory.Exists(moduleDirectory)) { modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesManifestFileExtensionPattern)); + PowerShellConstants.ModulesManifestFileExtensionPattern, + SearchOption.AllDirectories)); modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesBinaryFileExtensionPattern)); + PowerShellConstants.ModulesBinaryFileExtensionPattern, + SearchOption.AllDirectories)); modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesScriptFileExtensionPattern)); + PowerShellConstants.ModulesScriptFileExtensionPattern, + SearchOption.AllDirectories)); } return modulePaths; From 8a09f3719ff82dd69b3670dd25fbacf3dab7b1a1 Mon Sep 17 00:00:00 2001 From: Matt Mason Date: Wed, 21 Dec 2016 12:59:54 -0800 Subject: [PATCH 2/3] schemastore updates --- schemas/json/function.json | 1458 ++++++++++++++++++------------------ 1 file changed, 732 insertions(+), 726 deletions(-) diff --git a/schemas/json/function.json b/schemas/json/function.json index c825c2da78..8cc5600b91 100644 --- a/schemas/json/function.json +++ b/schemas/json/function.json @@ -1,747 +1,753 @@ { - "title": "JSON schema for Azure Functions function.json files", - "$schema": "http://json-schema.org/draft-04/schema#", - "type": "object", - "properties": { - "disabled": { - "type": "boolean", - "description": "If set to true, marks the function as disabled." - }, - "bindings": { - "type": "array", - "description": "A list of function bindings.", - "items": { - "type": "object", - "properties": { - "type": { - "type": "string", - "oneOf": [ - { - "$ref": "#/definitions/bindingNames" - }, - { - "not": { - "$ref": "#/definitions/bindingNames" - } - } - ] - } - }, - "allOf": [ - { - "$ref": "#/definitions/binding" - } - ], - "required": [ - "type" - ], - "dependencies": { - "type": { - "oneOf": [ - { - "$ref": "#/definitions/timerTrigger" - }, - { - "$ref": "#/definitions/queueTrigger" - }, - { - "$ref": "#/definitions/queue" - }, - { - "$ref": "#/definitions/httpTrigger" - }, - { - "$ref": "#/definitions/http" - }, - { - "$ref": "#/definitions/eventHubTrigger" - }, - { - "$ref": "#/definitions/eventHub" - }, - { - "$ref": "#/definitions/serviceBusTrigger" - }, - { - "$ref": "#/definitions/serviceBus" - }, - { - "$ref": "#/definitions/blobTrigger" - }, - { - "$ref": "#/definitions/blob" - }, - { - "$ref": "#/definitions/manualTrigger" - }, - { - "$ref": "#/definitions/table" - }, - { - "$ref": "#/definitions/dynamic" - }, - { - "$ref": "#/definitions/notificationHub" - }, - { - "$ref": "#/definitions/twilioSms" - }, - { - "$ref": "#/definitions/sendGrid" - }, - { - "$ref": "#/definitions/mobileTable" - }, - { - "$ref": "#/definitions/documentDB" - } - ] - } - } - } - } + "title": "JSON schema for Azure Functions function.json files", + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "disabled": { + "type": "boolean", + "description": "If set to true, marks the function as disabled." }, - "definitions": { - "bindingNames": { + "bindings": { + "type": "array", + "description": "A list of function bindings.", + "items": { + "type": "object", + "properties": { + "type": { "type": "string", - "enum": [ - "timerTrigger", - "queueTrigger", - "queue", - "httpTrigger", - "http", - "eventHubTrigger", - "eventHub", - "manualTrigger", - "blobTrigger", - "blob", - "serviceBusTrigger", - "serviceBus", - "table", - "notificationHub", - "twilioSms", - "sendGrid", - "mobileTable", - "documentDB" - ] - }, - "serviceBusTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "serviceBusTrigger" - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - }, - { - "$ref": "#/definitions/serviceBusBase" - } - ] - }, - "serviceBus": { - "properties": { - "type": { - "type": "string", - "pattern": "serviceBus" - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - }, - { - "$ref": "#/definitions/serviceBusBase" - } - ] - }, - "serviceBusBase": { - "properties": { - "queueName": { - "type": "string", - "description": "The service bus queue to monitor (if using a queue)" - }, - "topicName": { - "type": "string", - "description": "The service bus topic to monitor (if using a queue)" - }, - "subscriptionName": { - "type": "string", - "description": "The topic subscription name" - }, - "connection": { - "type": "string", - "description": "An app setting (or environment variable) with the service bus connection string to be used by this binding." - }, - "accessRights": { - "type": "string", - "description": "The permission level of the service bus connection string used by this binding.", - "enum": [ - "manage", - "listen" - ] - } - } - }, - "blobTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "blobTrigger" - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - }, - { - "$ref": "#/definitions/blobBindingBase" - } - ] - }, - "blob": { - "properties": { - "type": { - "type": "string", - "pattern": "blob" - } - }, - "allOf": [ - { - "$ref": "#/definitions/blobBindingBase" - }, - { - "$ref": "#/definitions/binding" - } - ] - }, - "blobBindingBase": { - "properties": { - "path": { - "type": "string", - "description": "The path to the blob contaiter" - }, - "connection": { - "type": "string", - "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." - } - } - }, - "manualTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "manualTrigger" - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - } - ] - }, - "eventHubTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "eventHubTrigger" - }, - "consumerGroup": { - "type": "string", - "description": "The event hub consumer group." - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - }, - { - "$ref": "#/definitions/eventHubBase" - } - ] - }, - "eventHub": { - "properties": { - "type": { - "type": "string", - "pattern": "eventHub" - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - }, - { - "$ref": "#/definitions/eventHubBase" - } - ] - }, - "eventHubBase": { - "properties": { - "path": { - "type": "string", - "description": "The event hub path." - }, - "connection": { - "type": "string", - "description": "The event hub connection string setting." - } - } - }, - "timerTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "timerTrigger" - }, - "schedule": { - "type": "string", - "description": "A CRON expression representing the timer schedule.", - "pattern": "^(\\*|((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?)(,((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?)(,((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(((1\\d)|(2[0-3])|\\d)(\\-((1\\d)|(2[0-3])|\\d)(\\/\\d+)?)?)(,(((1\\d)|(2[0-3])|\\d)(\\-((1\\d)|(2[0-3])|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|((([1-2]\\d)|(3[0-1])|[1-9])(\\-(([1-2]\\d)|(3[0-1])|[1-9])(\\/\\d+)?)?)(,((([1-2]\\d)|(3[0-1])|[1-9])(\\-(([1-2]\\d)|(3[0-1])|[1-9])(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(([A-Za-z]+|(1[0-2])|[1-9])(\\-([A-Za-z]+|(1[0-2])|[1-9])(\\/\\d+)?)?)(,(([A-Za-z]+|(1[0-2])|[1-9])(\\-([A-Za-z]+|(1[0-2])|[1-9])(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(([A-Za-z]+|[0-6])(\\-([A-Za-z]+|[0-6])(\\/\\d+)?)?)(,(([A-Za-z]+|[0-6])(\\-([A-Za-z]+|[0-6])(\\/\\d+)?)?))*)(\\/\\d+)?$" - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - } - ] - }, - "queueTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "queueTrigger" - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - }, - { - "$ref": "#/definitions/queueBase" - } - ] - }, - "queue": { - "properties": { - "type": { - "type": "string", - "pattern": "queue" - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - }, - { - "$ref": "#/definitions/queueBase" - } - ] - }, - "queueBase": { - "properties": { - "queueName": { - "type": "string", - "description": "The queue name." - }, - "connection": { - "type": "string", - "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." - } - } - }, - "httpTrigger": { - "properties": { - "type": { - "type": "string", - "pattern": "httpTrigger" - }, - "route": { - "type": "string", - "description": "The function HTTP route template." - }, - "webHookType": { - "type": "string", - "description": "The type of WebHook handled by the trigger (if handling a pre-defined WebHook)." - }, - "authLevel": { - "type": "string", - "default": "function", - "enum": [ - "anonymous", - "function", - "admin" - ], - "description": "The function HTTP authorization level." - }, - "methods": { - "type": "array", - "items": [ - { - "type": "string", - "enum": [ - "get", - "post", - "delete", - "head", - "patch", - "put", - "options", - "trace" - ] - } - ] - } - }, - "allOf": [ - { - "$ref": "#/definitions/trigger" - } - ] - }, - "http": { - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } - ] - }, - "mobileTable": { - "properties": { - "type": { - "type": "string", - "pattern": "mobileTable" - }, - "tableName": { - "type": "string", - "description": "This is the name of the table within your Mobile App to which data will be written." - }, - "connection": { - "type": "string", - "description": "This is the app setting name that specifies the URL of your Mobile App." - }, - "apiKey": { - "type": "string", - "description": "This is app setting name that specifies the API Key for your Mobile App." - } - }, "oneOf": [ - { - "$ref": "#/definitions/mobileTableInputBinding" - }, - { - "$ref": "#/definitions/mobileTableOutputBinding" - } - ] - }, - "mobileTableInputBinding": { - "properties": { - "id": { - "type": "string", - "description": "This is the id for the record to retrieve." - } - }, - "allOf": [ - { - "$ref": "#/definitions/inputBinding" - } - ] - }, - "mobileTableOutputBinding": { - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } + { + "$ref": "#/definitions/bindingNames" + }, + { + "not": { + "$ref": "#/definitions/bindingNames" + } + } ] - }, - "documentDB": { - "properties": { - "type": { - "type": "string", - "pattern": "documentDB" - }, - "connection": { - "type": "string", - "description": "This is the connection string for your DocumentDB account." - }, - "databaseName": { - "type": "string", - "description": "This is the name of the database within your DocumentDB account to which data will be written." - }, - "collectionName": { - "type": "string", - "description": "This is the name of the collection within your database to which data will be written." - } - }, + } + }, + "allOf": [ + { + "$ref": "#/definitions/binding" + } + ], + "required": [ + "type" + ], + "dependencies": { + "type": { "oneOf": [ - { - "$ref": "#/definitions/documentDBInputBinding" - }, - { - "$ref": "#/definitions/documentDBOutputBinding" - } - ] - }, - "documentDBInputBinding": { - "allOf": [ - { - "$ref": "#/definitions/inputBinding" - } - ] - }, - "documentDBOutputBinding": { - "properties": { - "createIfNotExists": { - "type": "boolean", - "description": "When true, your database and collection will be created automatically." - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } + { + "$ref": "#/definitions/timerTrigger" + }, + { + "$ref": "#/definitions/queueTrigger" + }, + { + "$ref": "#/definitions/queue" + }, + { + "$ref": "#/definitions/httpTrigger" + }, + { + "$ref": "#/definitions/http" + }, + { + "$ref": "#/definitions/eventHubTrigger" + }, + { + "$ref": "#/definitions/eventHub" + }, + { + "$ref": "#/definitions/serviceBusTrigger" + }, + { + "$ref": "#/definitions/serviceBus" + }, + { + "$ref": "#/definitions/blobTrigger" + }, + { + "$ref": "#/definitions/blob" + }, + { + "$ref": "#/definitions/manualTrigger" + }, + { + "$ref": "#/definitions/table" + }, + { + "$ref": "#/definitions/dynamic" + }, + { + "$ref": "#/definitions/notificationHub" + }, + { + "$ref": "#/definitions/twilioSms" + }, + { + "$ref": "#/definitions/sendGrid" + }, + { + "$ref": "#/definitions/mobileTable" + }, + { + "$ref": "#/definitions/documentDB" + } ] + } + } + } + } + }, + "definitions": { + "bindingNames": { + "type": "string", + "enum": [ + "timerTrigger", + "queueTrigger", + "queue", + "httpTrigger", + "http", + "eventHubTrigger", + "eventHub", + "manualTrigger", + "blobTrigger", + "blob", + "serviceBusTrigger", + "serviceBus", + "table", + "notificationHub", + "twilioSms", + "sendGrid", + "mobileTable", + "documentDB" + ] + }, + "serviceBusTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^serviceBusTrigger$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" }, - "table": { - "properties": { - "type": { - "type": "string", - "pattern": "table" - }, - "tableName": { - "type": "string", - "description": "The name of the storage table." - }, - "partitionKey": { - "type": "string", - "description": "The partition key." - }, - "rowKey": { - "type": "string", - "description": "The table row key." - }, - "connection": { - "type": "string", - "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." - } - }, - "oneOf": [ - { - "$ref": "#/definitions/tableInputBinding" - }, - { - "$ref": "#/definitions/tableOutputBinding" - } - ] + { + "$ref": "#/definitions/serviceBusBase" + } + ] + }, + "serviceBus": { + "properties": { + "type": { + "type": "string", + "pattern": "^serviceBus$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" }, - "tableInputBinding": { - "properties": { - "take": { - "type": "string", - "description": "The number or records to retrieve." - }, - "filter": { - "type": "string", - "description": "A filter expression to be applied when retrieving rows." - } - }, - "allOf": [ - { - "$ref": "#/definitions/inputBinding" - } - ] + { + "$ref": "#/definitions/serviceBusBase" + } + ] + }, + "serviceBusBase": { + "properties": { + "queueName": { + "type": "string", + "description": "The service bus queue to monitor (if using a queue)" + }, + "topicName": { + "type": "string", + "description": "The service bus topic to monitor (if using a queue)" + }, + "subscriptionName": { + "type": "string", + "description": "The topic subscription name" + }, + "connection": { + "type": "string", + "description": "An app setting (or environment variable) with the service bus connection string to be used by this binding." + }, + "accessRights": { + "type": "string", + "description": "The permission level of the service bus connection string used by this binding.", + "enum": [ + "manage", + "listen" + ] + } + } + }, + "blobTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^blobTrigger$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" }, - "tableOutputBinding": { - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } - ] + { + "$ref": "#/definitions/blobBindingBase" + } + ] + }, + "blob": { + "properties": { + "type": { + "type": "string", + "pattern": "^blob$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/blobBindingBase" }, - "notificationHub": { - "properties": { - "type": { - "type": "string", - "pattern": "notificationHub" - }, - "tagExpression": { - "type": "string", - "description": "The tag to send the notification to." - }, - "hubName": { - "type": "string", - "description": "The name of the notification hub." - }, - "connection": { - "type": "string", - "description": "The name of the app setting which contains the notification hub connection string." - }, - "platform": { - "type": "string", - "description": "The notification platform to target.", - "enum": [ - "template", - "apns", - "adm", - "gcm", - "wns", - "mpns" - ] - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } - ] + { + "$ref": "#/definitions/binding" + } + ] + }, + "blobBindingBase": { + "properties": { + "path": { + "type": "string", + "description": "The path to the blob contaiter" + }, + "connection": { + "type": "string", + "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." + } + } + }, + "manualTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^manualTrigger$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" + } + ] + }, + "eventHubTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^eventHubTrigger$" + }, + "consumerGroup": { + "type": "string", + "description": "The event hub consumer group." + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" }, - "twilioSms": { - "properties": { - "type": { - "type": "string", - "pattern": "twilioSms" - }, - "accountSid": { - "type": "string", - "description": "The name of the app setting which contains your Twilio Account Sid." - }, - "authToken": { - "type": "string", - "description": "The name of the app setting which contains your Twilio authentication token." - }, - "to": { - "type": "string", - "description": "The phone number the SMS text is sent to." - }, - "from": { - "type": "string", - "description": "The phone number the SMS text is sent from." - }, - "body": { - "type": "string", - "description": "Optional body of SMS text message." - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } - ] + { + "$ref": "#/definitions/eventHubBase" + } + ] + }, + "eventHub": { + "properties": { + "type": { + "type": "string", + "pattern": "^eventHub$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" }, - "sendGrid": { - "properties": { - "type": { - "type": "string", - "pattern": "sendGrid" - }, - "apiKey": { - "type": "string", - "description": "The name of the app setting which contains your SendGrid api key." - }, - "to": { - "type": "string", - "description": "The email address to send to." - }, - "from": { - "type": "string", - "description": "The email address to send from." - }, - "subject": { - "type": "string", - "description": "The subject of the email." - }, - "text": { - "type": "string", - "description": "The text of the email." - } - }, - "allOf": [ - { - "$ref": "#/definitions/outputBinding" - } - ] + { + "$ref": "#/definitions/eventHubBase" + } + ] + }, + "eventHubBase": { + "properties": { + "path": { + "type": "string", + "description": "The event hub path." + }, + "connection": { + "type": "string", + "description": "The event hub connection string setting." + } + } + }, + "timerTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^timerTrigger$" + }, + "schedule": { + "type": "string", + "description": "A CRON expression representing the timer schedule.", + "pattern": "^^(\\*|((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?)(,((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?)(,((([1-5]\\d)|\\d)(\\-(([1-5]\\d)|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(((1\\d)|(2[0-3])|\\d)(\\-((1\\d)|(2[0-3])|\\d)(\\/\\d+)?)?)(,(((1\\d)|(2[0-3])|\\d)(\\-((1\\d)|(2[0-3])|\\d)(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|((([1-2]\\d)|(3[0-1])|[1-9])(\\-(([1-2]\\d)|(3[0-1])|[1-9])(\\/\\d+)?)?)(,((([1-2]\\d)|(3[0-1])|[1-9])(\\-(([1-2]\\d)|(3[0-1])|[1-9])(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(([A-Za-z]+|(1[0-2])|[1-9])(\\-([A-Za-z]+|(1[0-2])|[1-9])(\\/\\d+)?)?)(,(([A-Za-z]+|(1[0-2])|[1-9])(\\-([A-Za-z]+|(1[0-2])|[1-9])(\\/\\d+)?)?))*)(\\/\\d+)? (\\*|(([A-Za-z]+|[0-6])(\\-([A-Za-z]+|[0-6])(\\/\\d+)?)?)(,(([A-Za-z]+|[0-6])(\\-([A-Za-z]+|[0-6])(\\/\\d+)?)?))*)(\\/\\d+)?$$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" + } + ] + }, + "queueTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^queueTrigger$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" }, - "binding": { - "properties": { - "direction": { - "type": "string", - "enum": [ - "in", - "out", - "inout" - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "direction", - "name" - ] + { + "$ref": "#/definitions/queueBase" + } + ] + }, + "queue": { + "properties": { + "type": { + "type": "string", + "pattern": "^queue$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" }, - "trigger": { - "properties": { - "direction": { - "type": "string", - "enum": [ - "in" - ] - }, - "name": { - "type": "string" - }, - }, - "required": [ - "direction", - "name" - ] + { + "$ref": "#/definitions/queueBase" + } + ] + }, + "queueBase": { + "properties": { + "queueName": { + "type": "string", + "description": "The queue name." + }, + "connection": { + "type": "string", + "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." + } + } + }, + "httpTrigger": { + "properties": { + "type": { + "type": "string", + "pattern": "^httpTrigger$" + }, + "route": { + "type": "string", + "description": "The function HTTP route template." + }, + "webHookType": { + "type": "string", + "description": "The type of WebHook handled by the trigger (if handling a pre-defined WebHook)." + }, + "authLevel": { + "type": "string", + "default": "function", + "enum": [ + "anonymous", + "function", + "admin" + ], + "description": "The function HTTP authorization level." + }, + "methods": { + "type": "array", + "items": [ + { + "type": "string", + "enum": [ + "get", + "post", + "delete", + "head", + "patch", + "put", + "options", + "trace" + ] + } + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/trigger" + } + ] + }, + "http": { + "properties": { + "type": { + "type": "string", + "pattern": "^http$" + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "mobileTable": { + "properties": { + "type": { + "type": "string", + "pattern": "^mobileTable$" + }, + "tableName": { + "type": "string", + "description": "This is the name of the table within your Mobile App to which data will be written." + }, + "connection": { + "type": "string", + "description": "This is the app setting name that specifies the URL of your Mobile App." + }, + "apiKey": { + "type": "string", + "description": "This is app setting name that specifies the API Key for your Mobile App." + } + }, + "oneOf": [ + { + "$ref": "#/definitions/mobileTableInputBinding" }, - "inputBinding": { - "properties": { - "direction": { - "type": "string", - "enum": [ - "in" - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "direction", - "name" - ] + { + "$ref": "#/definitions/mobileTableOutputBinding" + } + ] + }, + "mobileTableInputBinding": { + "properties": { + "id": { + "type": "string", + "description": "This is the id for the record to retrieve." + } + }, + "allOf": [ + { + "$ref": "#/definitions/inputBinding" + } + ] + }, + "mobileTableOutputBinding": { + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "documentDB": { + "properties": { + "type": { + "type": "string", + "pattern": "^documentDB$" + }, + "connection": { + "type": "string", + "description": "This is the connection string for your DocumentDB account." + }, + "databaseName": { + "type": "string", + "description": "This is the name of the database within your DocumentDB account to which data will be written." + }, + "collectionName": { + "type": "string", + "description": "This is the name of the collection within your database to which data will be written." + } + }, + "oneOf": [ + { + "$ref": "#/definitions/documentDBInputBinding" }, - "outputBinding": { - "properties": { - "direction": { - "type": "string", - "enum": [ - "out" - ] - }, - "name": { - "type": "string" - } - }, - "required": [ - "direction", - "name" - ] + { + "$ref": "#/definitions/documentDBOutputBinding" + } + ] + }, + "documentDBInputBinding": { + "allOf": [ + { + "$ref": "#/definitions/inputBinding" + } + ] + }, + "documentDBOutputBinding": { + "properties": { + "createIfNotExists": { + "type": "boolean", + "description": "When true, your database and collection will be created automatically." + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "table": { + "properties": { + "type": { + "type": "string", + "pattern": "^table$" + }, + "tableName": { + "type": "string", + "description": "The name of the storage table." + }, + "partitionKey": { + "type": "string", + "description": "The partition key." + }, + "rowKey": { + "type": "string", + "description": "The table row key." + }, + "connection": { + "type": "string", + "description": "An app setting (or environment variable) with the storage connection string to be used by this binding." + } + }, + "oneOf": [ + { + "$ref": "#/definitions/tableInputBinding" }, - "dynamic": { - "properties": { - "type": { - "type": "string", - "not": { - "$ref": "#/definitions/bindingNames" - } - } - } + { + "$ref": "#/definitions/tableOutputBinding" + } + ] + }, + "tableInputBinding": { + "properties": { + "take": { + "type": "string", + "description": "The number or records to retrieve." + }, + "filter": { + "type": "string", + "description": "A filter expression to be applied when retrieving rows." + } + }, + "allOf": [ + { + "$ref": "#/definitions/inputBinding" + } + ] + }, + "tableOutputBinding": { + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "notificationHub": { + "properties": { + "type": { + "type": "string", + "pattern": "^notificationHub$" + }, + "tagExpression": { + "type": "string", + "description": "The tag to send the notification to." + }, + "hubName": { + "type": "string", + "description": "The name of the notification hub." + }, + "connection": { + "type": "string", + "description": "The name of the app setting which contains the notification hub connection string." + }, + "platform": { + "type": "string", + "description": "The notification platform to target.", + "enum": [ + "template", + "apns", + "adm", + "gcm", + "wns", + "mpns" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "twilioSms": { + "properties": { + "type": { + "type": "string", + "pattern": "^twilioSms$" + }, + "accountSid": { + "type": "string", + "description": "The name of the app setting which contains your Twilio Account Sid." + }, + "authToken": { + "type": "string", + "description": "The name of the app setting which contains your Twilio authentication token." + }, + "to": { + "type": "string", + "description": "The phone number the SMS text is sent to." + }, + "from": { + "type": "string", + "description": "The phone number the SMS text is sent from." + }, + "body": { + "type": "string", + "description": "Optional body of SMS text message." + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "sendGrid": { + "properties": { + "type": { + "type": "string", + "pattern": "^sendGrid$" + }, + "apiKey": { + "type": "string", + "description": "The name of the app setting which contains your SendGrid api key." + }, + "to": { + "type": "string", + "description": "The email address to send to." + }, + "from": { + "type": "string", + "description": "The email address to send from." + }, + "subject": { + "type": "string", + "description": "The subject of the email." + }, + "text": { + "type": "string", + "description": "The text of the email." + } + }, + "allOf": [ + { + "$ref": "#/definitions/outputBinding" + } + ] + }, + "binding": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "in", + "out", + "inout" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "direction", + "name" + ] + }, + "trigger": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "in" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "direction", + "name" + ] + }, + "inputBinding": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "in" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "direction", + "name" + ] + }, + "outputBinding": { + "properties": { + "direction": { + "type": "string", + "enum": [ + "out" + ] + }, + "name": { + "type": "string" + } + }, + "required": [ + "direction", + "name" + ] + }, + "dynamic": { + "properties": { + "type": { + "type": "string", + "not": { + "$ref": "#/definitions/bindingNames" + } } + } } + } } \ No newline at end of file From 19d0f26c1be74653e3e0c1cd5b898d63228bb8f3 Mon Sep 17 00:00:00 2001 From: David OBrien Date: Fri, 23 Dec 2016 01:08:43 +1100 Subject: [PATCH 3/3] Add recursive search to GetModuleFilePaths so that modules can be maintained in folders. --- .../Description/PowerShell/PowerShellFunctionInvoker.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs b/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs index ccc000af09..0dd9575955 100644 --- a/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs +++ b/src/WebJobs.Script/Description/PowerShell/PowerShellFunctionInvoker.cs @@ -265,11 +265,14 @@ internal static List GetModuleFilePaths(string rootScriptPath, string fu if (Directory.Exists(moduleDirectory)) { modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesManifestFileExtensionPattern)); + PowerShellConstants.ModulesManifestFileExtensionPattern, + SearchOption.AllDirectories)); modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesBinaryFileExtensionPattern)); + PowerShellConstants.ModulesBinaryFileExtensionPattern, + SearchOption.AllDirectories)); modulePaths.AddRange(Directory.GetFiles(moduleDirectory, - PowerShellConstants.ModulesScriptFileExtensionPattern)); + PowerShellConstants.ModulesScriptFileExtensionPattern, + SearchOption.AllDirectories)); } return modulePaths;