Skip to content

Commit

Permalink
Fix changelog schema validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Feb 1, 2024
1 parent 0b39970 commit abc5fbf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 0 additions & 3 deletions changelog/Microsoft.DirectoryServices.json
Original file line number Diff line number Diff line change
Expand Up @@ -6021,9 +6021,6 @@
"ChangeList": [
{
"Id": "57281ce6-70f8-4348-8b99-9fd38d42b03d",
"ApiChange": "Property",
"ChangedApiName": "agreementFile",
"Id": "9b6a0290-80aa-11eb-8a3c-f63608ac46d5",
"ApiChange": "Resource",
"ChangedApiName": "approval",
"ChangeType": "Addition",
Expand Down
9 changes: 2 additions & 7 deletions changelog/Microsoft.Skype.Calling.json
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,6 @@
],
"Id": "729577c2-b7b5-42a5-8519-923dd2ae25e3",
"Cloud": "Prod",
"Cloud": "Prod",
"Version": "beta",
"CreatedDateTime": "2021-12-08T00:00:00",
"WorkloadArea": "Teamwork and communications",
Expand Down Expand Up @@ -3788,9 +3787,7 @@
"CreatedDateTime": "2024-01-11T14:33:56.7633181Z",
"WorkloadArea": "Teamwork and communications",
"SubArea": "Calls and online meetings"
}
],
"changelog": [
},
{
"ChangeList": [
{
Expand Down Expand Up @@ -3824,9 +3821,7 @@
"CreatedDateTime": "2023-11-09T18:20:26.249248Z",
"WorkloadArea": "Teamwork and communications",
"SubArea": "Calls and online meetings"
}
],
"changelog": [
},
{
"ChangeList": [
{
Expand Down
4 changes: 2 additions & 2 deletions validate-changelog-json.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ Get-ChildItem -Filter "changelog/*.json" | Where-Object { $schemaFileName -notco
if(($json | Test-Json -Schema $schema -ErrorAction:SilentlyContinue) -eq $true){
Write-Host ("Passed Validation : " + $_.Name) -ForegroundColor Green
} else {
$err += "File found with invalid changelog: " + $_.Name + "`nError Details: " + $Error[0].Exception.Message + "`r`n" + $Error[0].Exception.InnerException.Message + "`r`n";
$err += "File found with invalid changelog format: " + $_.Name + "`nError Details: " + $Error[0].Exception.Message + "`r`n" + $Error[0].Exception.InnerException.Message + "`r`n";
}

} else {
$err += $_.Name + "`t`t" + $Error[0].Exception.Message + "`r`n";
$err += "File found with invalid json format: " + $_.Name + "`nError Details: " + $Error[0].Exception.Message + "`r`n" + $Error[0].Exception.InnerException.Message + "`r`n";
}
}

Expand Down

0 comments on commit abc5fbf

Please sign in to comment.