updating apiPropertiesValidator.yml (#2851)
* Fixing apiProperties validator * Updating apiPropertiesValidator
This commit is contained in:
Родитель
a15ee18740
Коммит
963744761c
|
@ -14,13 +14,11 @@ steps:
|
|||
Authorization = $env:token
|
||||
}
|
||||
|
||||
Write-Host "apriPropertiesUrl: $env:apiPropertiesValidator"
|
||||
foreach ($file in $apiPropertiesFiles) {
|
||||
$newFileContent = Get-Content $file -Raw
|
||||
|
||||
# Validate apiProperties json
|
||||
# $apiPropertiesValidatorUri = "$($env:apiPropertiesValidator)?api-version=2021-05-01&suppressWarnings=true"
|
||||
$results = Invoke-RestMethod -Uri $env:apiPropertiesValidator -Headers $Headers -Method Post -ContentType "application/json; charset=utf-8" -Body [$newFileContent]
|
||||
$results = Invoke-RestMethod -Uri "$(apiPropertiesValidatorUrl)" -Headers $Headers -Method Post -ContentType "application/json; charset=utf-8" -Body [$newFileContent]
|
||||
|
||||
$errors = $results | Where-Object { $_.level -EQ "Critical" -OR $_.Level -EQ "Error" }
|
||||
$warnings = $results | Where-Object { $_.level -EQ "Warning" }
|
||||
|
@ -46,5 +44,4 @@ steps:
|
|||
Write-Host "##vso[task.complete result=Succeeded;]No error or warnings encountered."
|
||||
}
|
||||
env:
|
||||
apiPropertiesValidator: "$(apiPropertiesValidatorUrl)"
|
||||
token: $(token)
|
||||
|
|
Загрузка…
Ссылка в новой задаче