Sort by service name first (#3570)

Co-authored-by: sima-zhu <sizhu@microsoft.com>
This commit is contained in:
Azure SDK Bot 2022-04-19 15:53:43 -07:00 committed by GitHub
parent 201d588b6d
commit 4261bd3562
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -126,7 +126,7 @@ function GenerateDocfxTocContent([Hashtable]$tocContent, [String]$lang, [String]
New-Item -Path $YmlPath -Name "toc.yml" -Force
$visitedService = @{}
# Sort and display toc service name by alphabetical order, and then sort artifact by order.
$sortedToc = $tocContent.Values | Sort-Object NewIndex, TypeIndex, ServiceName, DisplayName, Artifact
$sortedToc = $tocContent.Values | Sort-Object ServiceName, NewIndex, TypeIndex, DisplayName, Artifact
foreach ($serviceMapping in $sortedToc) {
$artifact = $serviceMapping.Artifact
$serviceName = $serviceMapping.ServiceName