diff --git a/src/Helper.ps1 b/src/Helper.ps1 index f5034e5..e3c7a73 100644 --- a/src/Helper.ps1 +++ b/src/Helper.ps1 @@ -37,6 +37,13 @@ Function Get-Action { } $type = $action.type + + $Description = if ($action | Get-Member -MemberType Noteproperty -Name 'Description') { + $action.Description + } + else{ + $null + } # new ChildActions code $childActions = if (($action | Get-Member -MemberType Noteproperty -Name 'Actions') -and ($action.Actions.PSObject.Properties | measure-object).count -gt 0) { $action.Actions.PSObject.Properties.Name } else { $null } @@ -48,6 +55,7 @@ Function Get-Action { Type = $type Parent = $Parent ChildActions = $childActions + Comment = $description Inputs = if ($inputs) { Format-HTMLInputContent -Inputs $(Remove-Secrets -Inputs $($inputs | ConvertTo-Json -Depth 10 -Compress)) } @@ -254,4 +262,4 @@ Function Format-HTMLInputContent { else { $Inputs } -} \ No newline at end of file +} diff --git a/src/LogicApp.Doc.ps1 b/src/LogicApp.Doc.ps1 index eb42fc3..77f464d 100644 --- a/src/LogicApp.Doc.ps1 +++ b/src/LogicApp.Doc.ps1 @@ -34,8 +34,8 @@ $($InputObject.diagram) Section 'Actions' { $($InputObject.actions) | Sort-Object -Property Order | - Select-Object -Property 'ActionName', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10) } } | - Table -Property 'ActionName', 'Type', 'RunAfter', 'Inputs' + Select-Object -Property 'ActionName', 'Comment', 'Type', 'RunAfter', @{Name = 'Inputs'; Expression = { Format-MarkdownTableJson -Json $($_.Inputs | ConvertFrom-Json | ConvertTo-Json -Depth 10) } } | + Table -Property 'ActionName', 'Comment', 'Type', 'RunAfter', 'Inputs' } } @@ -50,4 +50,4 @@ $($InputObject.diagram) } } } -} \ No newline at end of file +}