Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
YanaXu opened this issue Aug 25, 2023 · 0 comments
Open
Labels

Comments

@YanaXu
Copy link
Contributor

YanaXu commented Aug 25, 2023

Refer to the custom ps1 file src/DevCenter/DevCenter.AutoRest/custom/New-AzDevCenterAdminPool.ps1.
The parameter definitions in custom ps1 are:

        # 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

### -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

### -Tag
Resource tags.

This issue can be workarounded by an empty line in this PR.

@VeryEarly VeryEarly changed the title build-module.ps1 generated incorrect docs for comments in cmstom ps1 file build-module.ps1 generated incorrect docs for comments in custom ps1 file Aug 25, 2023
@dolauli dolauli added the P2 label Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants