File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,12 @@ steps:
17
17
foreach ($file in $apiPropertiesFiles) {
18
18
$newFileContent = Get-Content $file -Raw
19
19
20
+ $newFileContentAsList = New-Object Collections.Generic.List[Object]
21
+ $newFileContentAsList.add($newFileContent)
22
+
20
23
# Validate apiProperties json
21
24
$apiPropertiesValidatorUri = "$($env:apiPropertiesValidator)?api-version=2021-05-01&suppressWarnings=true"
22
- $results = Invoke-RestMethod -Uri $apiPropertiesValidatorUri -Headers $Headers -Method Post -ContentType "application/json; charset=utf-8" -Body @($newFileContent)
25
+ $results = Invoke-RestMethod -Uri $apiPropertiesValidatorUri -Headers $Headers -Method Post -ContentType "application/json; charset=utf-8" -Body $newFileContentAsList
23
26
24
27
$errors = $results | Where-Object { $_.level -EQ "Critical" -OR $_.Level -EQ "Error" }
25
28
$warnings = $results | Where-Object { $_.level -EQ "Warning" }
You can’t perform that action at this time.
0 commit comments