Skip to content

Commit d10457e

Browse files
committed
Added test examples to ensure that correct beta examples are not deleted
1 parent 6d84fdf commit d10457e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tools/ExamplesGenerator.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ if ($ModulesToGenerate.Count -eq 0) {
439439
[HashTable] $ModuleMapping = Get-Content $ModuleMappingConfigPath | ConvertFrom-Json -AsHashTable
440440
$ModulesToGenerate = $ModuleMapping.Keys
441441
}
442-
#Start-Generator -ModulesToGenerate $ModulesToGenerate -GenerationMode "auto"
442+
Start-Generator -ModulesToGenerate $ModulesToGenerate -GenerationMode "auto"
443443

444444
#Comment the above and uncomment the below start command, if you manually want to manually pass ExternalDocs url.
445445
#This is for scenarios where the correponding external docs url to the uri path gotten from Find-MgGraph command, is missing on the openapi.yml file for a particular module.
@@ -454,6 +454,9 @@ if ($ModulesToGenerate.Count -eq 0) {
454454
#2. Test for ensuring that a handwritten example is not tampered with
455455
#Start-Generator -GenerationMode "manual" -ManualExternalDocsUrl "https://docs.microsoft.com/graph/api/user-get?view=graph-rest-1.0" -GraphCommand "Get-MgUser" -GraphModule "Users" -Profile "v1.0"
456456

457-
#3. Test for updates from api reference
458-
Start-Generator -GenerationMode "manual" -ManualExternalDocsUrl "https://docs.microsoft.com/graph/api/serviceprincipal-post-approleassignedto?view=graph-rest-beta" -GraphCommand "New-MgBetaServicePrincipalAppRoleAssignedTo" -GraphModule "Applications" -Profile "beta"
457+
#3. Test for v1.0 updates from api reference
458+
#Start-Generator -GenerationMode "manual" -ManualExternalDocsUrl "https://docs.microsoft.com/graph/api/serviceprincipal-post-approleassignedto?view=graph-rest-v1.0" -GraphCommand "New-MgServicePrincipalAppRoleAssignedTo" -GraphModule "Applications" -Profile "v1.0"
459+
460+
#4. Test for beta updates from api reference
461+
#Start-Generator -GenerationMode "manual" -ManualExternalDocsUrl "https://docs.microsoft.com/graph/api/serviceprincipal-post-approleassignedto?view=graph-rest-beta" -GraphCommand "New-MgBetaServicePrincipalAppRoleAssignedTo" -GraphModule "Applications" -Profile "beta"
459462
#Write-Host -ForegroundColor Green "-------------Done-------------"

0 commit comments

Comments
 (0)