jeffhollan / LogicAppTemplateCreator

Script to convert Logic Apps into templates for deployment
MIT License
143 stars 74 forks source link

"path" parameter empty in AzureBlob and Filesystem actions #46

Closed ghost closed 4 years ago

ghost commented 5 years ago

Hi,

The latest version seems to lose the "path" input parameter value of AzureBlob and Filesystem action blocks. This is especially troublesome in cases (e.g. "List blobs in folder") where the path parameter contains a full folder or file path.

For example, the following action block "Create_blob": { "inputs": { "body": "'Some content text'", "host": { "connection": { "name": "@parameters('$connections')['azureblob']['connectionId']" } }, "method": "post", "path": "/datasets/default/files", "queries": { "folderPath": "@{parameters('ContainerName')}", "name": "@{parameters('FileName')}", "queryParametersSingleEncoded": true } }, "runAfter": {}, "runtimeConfiguration": { "contentTransfer": { "transferMode": "Chunked" } }, "type": "ApiConnection" } comes through in the template as "Create_blob": { "runAfter": {}, "type": "ApiConnection", "inputs": { "body": "'Some content text'", "host": { "connection": { "name": "@parameters('$connections')['azureblob']['connectionId']" } }, "method": "post", "path": "", "queries": { "folderPath": "@{parameters('ContainerName')}", "name": "@{parameters('FileName')}", "queryParametersSingleEncoded": true } }, "runtimeConfiguration": { "contentTransfer": { "transferMode": "Chunked" } } }

I really can't follow the C# code, but in the source I noticed that AzureBlob and Filesystem API Connections have some special processing in TemplateGenerator.cs involving some Base64 handling.

Regards, Patrik Palm

pfoolen commented 4 years ago

Hi, I'm having the same issue. Is it possible to fix this?

Kind Regards, Pieter

ghost commented 4 years ago

Hi,

Looks like the issue has already been fixed in LogicAppTemplate v1.0.9 (released some time ago, current is v1.0.14). It's available as a module from PowerShell Gallery.

-Patrik Palm