File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99
1010$TargetWord = " ByRef"
1111$ReplacementWord = " GraphRef"
12+ $actionPattern = [Regex ]::new(" (_[A-Z][a-z]+)" , " Compiled" )
1213$Stopwatch = [system.diagnostics.stopwatch ]::StartNew()
1314Get-ChildItem - Path $OpenAPIFilesPath | ForEach-Object {
1415 $filePath = $_.FullName
@@ -19,9 +20,8 @@ Get-ChildItem -Path $OpenAPIFilesPath | ForEach-Object {
1920 $operationId = $_
2021 # Matches '_{ActionName}' in operationIds formatted as '{entitySet}_{ActionName}{NavigationProperty}'. e.g.,
2122 # For 'applications_GetCreatedOnBehalfOfByRef', we will match '_Get'.
22- $actionPattern = [Regex ]::new(" (_[A-Z][a-z]+)" , " Compiled" )
2323 $match = $actionPattern.Match ($operationId )
24- if ($match -ne $null -and $match.Success ) {
24+ if ($null -ne $match -and $match.Success ) {
2525 $operationId = $operationId.Replace ($TargetWord , " " )
2626 # Suffix matched '_{ActionName}' with 'GraphRef'. GraphRef will be our safe unique word for identifying *ByRef commands in PowerShell e.g.,
2727 # 'applications_GetCreatedOnBehalfOfByRef' will be renamed to 'applications_GetGraphRefCreatedOnBehalfOf'.
You can’t perform that action at this time.
0 commit comments