platyPS icon indicating copy to clipboard operation
platyPS copied to clipboard

Generic type generated by PlatyPS in markdown is not expected

Open dingmeng-xue opened this issue 4 years ago • 3 comments

Steps to reproduce

The output is not expected when data type of property supports generic type. For instance,

  1. https://github.com/Azure/azure-powershell/blob/8bcc63f038501a8e5f58e09e038d3742dd433a27/src/DataLakeAnalytics/DataLakeAnalytics/help/Set-AzDataLakeAnalyticsAccount.md We expect System.Nullable<System.Int32> instead of System.Nullable``1[System.Int32]

In addition, you can see input format shows weird value.

System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.TierType, Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallState, Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]

System.Nullable`1[[Microsoft.Azure.Management.DataLake.Analytics.Models.FirewallAllowAzureIpsState, Microsoft.Azure.Management.DataLake.Analytics, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
  1. https://github.com/Azure/azure-powershell/blob/8bcc63f038501a8e5f58e09e038d3742dd433a27/src/Accounts/Accounts/help/Set-AzContext.md We expect ystem.Collections.Generic.IDictionary<System.String,System.String> instead of ystem.Collections.Generic.IDictionary``2[System.String,System.String]

As the result, generated online doc cannot show above type correctly.

Expected behavior

Actual behavior

Environment data

v0.5.0

dingmeng-xue avatar Apr 19 '21 09:04 dingmeng-xue

@theJasonHelmick @dingmeng-xue I had a look at the issue and have made changes to the code in v2 to ensure that the generated markdown will have something similar to System.Collections.Generic.List<System.String> instead of System.Collections.Generic.List``1[System.String]

adityapatwardhan avatar Nov 29 '21 22:11 adityapatwardhan

It will be available in the next preview of the module.

adityapatwardhan avatar Nov 29 '21 22:11 adityapatwardhan

Thank you @adityapatwardhan for confirming the next preview -- greatly appreciate the hard work.

theJasonHelmick avatar Nov 29 '21 22:11 theJasonHelmick

Retested. This is fixed in Microsoft.PowerShell.PlatyPS v1.

sdwheeler avatar May 24 '24 18:05 sdwheeler