@@ -104,7 +104,7 @@ function Get-Toc-Children($package, $groupId, $version, $docRepoLocation, $folde
104104 # Log and warn
105105 Write-Host " Not able to find namespaces from javadoc jar $package -$version -javadoc.jar"
106106 }
107- return (Get-Content $filePath | ForEach-Object {$_.Trim ()})
107+ return (Get-Content $filePath | ForEach-Object {$_.Trim () + " * " })
108108}
109109
110110function Fetch-Namespaces-From-Javadoc ($jarFilePath , $destination ) {
@@ -152,5 +152,125 @@ function Parse-Overview-Frame ($filePath, $destination) {
152152 $packages = [RegEx ]::Matches($htmlBody , " <li><a.*?>(?<package>.*?)<\/a><\/li>" )
153153 $namespaces = $packages | ForEach-Object { $_.Groups [" package" ].Value }
154154 Add-Content - Path $destination - Value $namespaces
155- Get-Content $destination
155+ }
156+
157+ function Get-java-UpdatedDocsMsToc ($toc ) {
158+ $services = $toc [0 ].items
159+ # Add services exsting in old toc but missing in automation.
160+ $otherService = $services [-1 ]
161+ $sortableServices = $services | Where-Object { $_ –ne $otherService }
162+ $sortableServices += [PSCustomObject ]@ {
163+ name = " Active Directory"
164+ href = " ~/docs-ref-services/{moniker}/resourcemanager-msi-readme.md"
165+ landingPageType = " Service"
166+ items = @ (
167+ [PSCustomObject ]@ {
168+ name = " Resource Management"
169+ href = " ~/docs-ref-services/{moniker}/resourcemanager-msi-readme.md"
170+ children = @ (" com.azure.resourcemanager.msi*" )
171+ },
172+ [PSCustomObject ]@ {
173+ name = " client"
174+ href = " ~/docs-ref-services/{moniker}/resourcemanager-msi-readme.md"
175+ children = @ (
176+ " com.microsoft.aad.adal*" ,
177+ " com.microsoft.aad.adal4j*" ,
178+ " com.microsoft.identity.client*" )
179+ })
180+ }
181+ $sortableServices += [PSCustomObject ]@ {
182+ name = " Edge Gateway"
183+ landingPageType = " Service"
184+ items = @ (
185+ [PSCustomObject ]@ {
186+ name = " Resource Management"
187+ children = @ (" com.microsoft.azure.management.edgegateway*" )
188+ })
189+ }
190+ $sortableServices += [PSCustomObject ]@ {
191+ name = " Resource Mover"
192+ landingPageType = " Service"
193+ items = @ (
194+ [PSCustomObject ]@ {
195+ name = " Resource Management"
196+ children = @ (" com.microsoft.azure.management.resourcemover.v2021_01_01*" )
197+ })
198+ }
199+ $sortableServices += [PSCustomObject ]@ {
200+ name = " Bing AutoSuggest"
201+ landingPageType = " Service"
202+ items = @ (
203+ [PSCustomObject ]@ {
204+ name = " Management"
205+ href = " ~/docs-ref-services/{moniker}/cognitiveservices/bing-autosuggest-readme.md"
206+ children = @ (" com.microsoft.azure.cognitiveservices.search.autosuggest*" )
207+ })
208+ }
209+ $sortableServices += [PSCustomObject ]@ {
210+ name = " Content Moderator"
211+ landingPageType = " Service"
212+ items = @ (
213+ [PSCustomObject ]@ {
214+ name = " Management"
215+ children = @ (" com.microsoft.azure.cognitiveservices.vision.contentmoderator*" )
216+ })
217+ }
218+ $sortableServices += [PSCustomObject ]@ {
219+ name = " Custom Vision"
220+ landingPageType = " Service"
221+ items = @ (
222+ [PSCustomObject ]@ {
223+ name = " Management"
224+ children = @ (" com.microsoft.azure.cognitiveservices.vision.customvision*" )
225+ })
226+ }
227+ $sortableServices += [PSCustomObject ]@ {
228+ name = " Face API"
229+ landingPageType = " Service"
230+ items = @ (
231+ [PSCustomObject ]@ {
232+ name = " Management"
233+ children = @ (" com.microsoft.azure.cognitiveservices.vision.faceapi*" )
234+ })
235+ }
236+ $sortableServices += [PSCustomObject ]@ {
237+ name = " Language Understanding"
238+ landingPageType = " Service"
239+ items = @ (
240+ [PSCustomObject ]@ {
241+ name = " Management"
242+ children = @ (
243+ " com.microsoft.azure.cognitiveservices.language.luis*" ,
244+ " com.microsoft.azure.cognitiveservices.language.luis.authoring*" )
245+ })
246+ }
247+ $sortableServices += [PSCustomObject ]@ {
248+ name = " Speech Service"
249+ landingPageType = " Service"
250+ items = @ (
251+ [PSCustomObject ]@ {
252+ name = " Management"
253+ children = @ (" com.microsoft.cognitiveservices.speech*" )
254+ })
255+ }
256+ $sortableServices += [PSCustomObject ]@ {
257+ name = " Text Analytics"
258+ landingPageType = " Service"
259+ items = @ (
260+ [PSCustomObject ]@ {
261+ name = " Management"
262+ children = @ (" com.microsoft.azure.cognitiveservices.language.text*" )
263+ })
264+ }
265+ $sortableServices += [PSCustomObject ]@ {
266+ name = " Cognitive Services"
267+ landingPageType = " Service"
268+ items = @ (
269+ [PSCustomObject ]@ {
270+ name = " Resource Management"
271+ children = @ (" com.microsoft.azure.management.cognitiveservices*" )
272+ })
273+ }
274+ $toc [0 ].items = ($sortableServices | Sort-Object - Property name) + $otherService
275+ return , $toc
156276}
0 commit comments