Azure / Azure/autorest.powershell

build-module.ps1 generated incorrect docs for comments in custom ps1 file

Open
#1,223 0 comments 0 reactions 0 assignees View on GitHub
P2
Dominant language
C#
Stars
123
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Refer to the custom ps1 file [src/DevCenter/DevCenter.AutoRest/custom/New-AzDevCenterAdminPool.ps1](https://github.com/Azure/azure-powershell/pull/22503/files/9b2acc4d07950154ae463d833d08a2212085831a#diff-38ecefbaa35cdc62d49179b8b933b296a568b34b20b8d0415cd33bbe30339fb8:~:text=%23%20Feature%20in,%24%7BTag%7D%2C).
The parameter definitions in custom ps1 are:
```powershell
# Feature in preview, uncomment when available
# [Parameter(ParameterSetName = 'CreateExpanded')]
# [Parameter(ParameterSetName = 'CreateViaIdentityExpanded')]
# [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')]
# [System.Int32]
# # The specified time in minutes to wait before stopping a Dev Box once disconnect is detected.
# ${StopOnDisconnectGracePeriodMinute},

# [Parameter(ParameterSetName = 'CreateExpanded')]
# [Parameter(ParameterSetName = 'CreateViaIdentityExpanded')]
# [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus])]
# [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')]
# [Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus]
# # Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.
# ${StopOnDisconnectStatus},

[Parameter(ParameterSetName = 'CreateExpanded')]
[Parameter(ParameterSetName = 'CreateViaIdentityExpanded')]
[Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Runtime.Info(PossibleTypes = ([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Models.Api30.ITrackedResourceTags]))]
[System.Collections.Hashtable]
# Resource tags.
${Tag},
```

After running `build-module.ps1`, it generates [src/DevCenter/DevCenter.AutoRest/docs/New-AzDevCenterAdminPool.md](https://github.com/Azure/azure-powershell/pull/22656/files#diff-034b35ddfdc0d05e0df518771929f2c6d24107bf7cc4e511ce195400c4a0cd54)
```markdown
### -Tag
[Parameter(ParameterSetName = 'CreateExpanded')]
[Parameter(ParameterSetName = 'CreateViaIdentityExpanded')]
[ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus])]
[Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Category('Body')]
[Microsoft.Azure.PowerShell.Cmdlets.DevCenter.Support.StopOnDisconnectEnableStatus]
# Whether the feature to stop the Dev Box on disconnect once the grace period has lapsed is enabled.
${StopOnDisconnectStatus},
Resource tags.
```

It should be
```markdown
### -Tag
Resource tags.
```

This issue can be workarounded by an empty line in this [PR](https://github.com/Azure/azure-powershell/pull/22656/files).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.