Skip to content

Commit 6a9f71e

Browse files
authored
Merge pull request #2017 from microsoftgraph/remove-duplicate-commandlet-check
Validate availability of a commandlet only once from metadata file
2 parents cbf9302 + 60058af commit 6a9f71e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tools/ExamplesGenerator.ps1

-11
Original file line numberDiff line numberDiff line change
@@ -79,22 +79,13 @@ function Get-Files {
7979
[Hashtable] $OpenApiContent
8080
)
8181

82-
$ModuleManifestFile = (Join-Path $PSScriptRoot "..\src\$Module\$GraphProfile\Microsoft.Graph.$Module.psd1")
83-
if($GraphProfile -eq "beta"){
84-
$ModuleManifestFile = (Join-Path $PSScriptRoot "..\src\$Module\$GraphProfile\Microsoft.Graph.Beta.$Module.psd1")
85-
}
86-
$ModuleManifestFileContent = Get-Content -Path $ModuleManifestFile
87-
8882
try {
8983
if (Test-Path $GraphProfilePath) {
9084

9185
foreach ($File in Get-ChildItem $GraphProfilePath) {
9286

9387
#Extract command over here
9488
$Command = [System.IO.Path]::GetFileNameWithoutExtension($File)
95-
#Check for cmdlet existence from the module manifest file
96-
if ($ModuleManifestFileContent | Select-String -pattern $Command) {
97-
9889
#Extract URI path
9990
$UriPath = $null
10091
if($GraphProfile -eq "beta"){
@@ -107,8 +98,6 @@ function Get-Files {
10798
$Method = $UriPaths.Method
10899
Get-ExternalDocsUrl -GraphProfile $GraphProfile -Url -UriPath $UriPath -Command $Command -OpenApiContent $OpenApiContent -GraphProfilePath $GraphProfilePath -Method $Method -Module $Module
109100
}
110-
111-
}
112101

113102
}
114103
}

0 commit comments

Comments
 (0)