From abc5fbf513c3242dfe89892e1c08a7a402b95daf Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 1 Feb 2024 10:37:32 +0300 Subject: [PATCH] Fix changelog schema validation --- changelog/Microsoft.DirectoryServices.json | 3 --- changelog/Microsoft.Skype.Calling.json | 9 ++------- validate-changelog-json.ps1 | 4 ++-- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/changelog/Microsoft.DirectoryServices.json b/changelog/Microsoft.DirectoryServices.json index 180a300dee9..cf9ba823ac2 100644 --- a/changelog/Microsoft.DirectoryServices.json +++ b/changelog/Microsoft.DirectoryServices.json @@ -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", diff --git a/changelog/Microsoft.Skype.Calling.json b/changelog/Microsoft.Skype.Calling.json index 7c470747e91..00777cdb02d 100644 --- a/changelog/Microsoft.Skype.Calling.json +++ b/changelog/Microsoft.Skype.Calling.json @@ -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", @@ -3788,9 +3787,7 @@ "CreatedDateTime": "2024-01-11T14:33:56.7633181Z", "WorkloadArea": "Teamwork and communications", "SubArea": "Calls and online meetings" - } - ], - "changelog": [ + }, { "ChangeList": [ { @@ -3824,9 +3821,7 @@ "CreatedDateTime": "2023-11-09T18:20:26.249248Z", "WorkloadArea": "Teamwork and communications", "SubArea": "Calls and online meetings" - } - ], - "changelog": [ + }, { "ChangeList": [ { diff --git a/validate-changelog-json.ps1 b/validate-changelog-json.ps1 index 078d3bd81c9..8864d72b2d3 100644 --- a/validate-changelog-json.ps1 +++ b/validate-changelog-json.ps1 @@ -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"; } }