From c17fda415af95c0c04fa2d4762538e239389b485 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Tue, 6 Sep 2022 12:21:53 -0700 Subject: [PATCH] Add schema for cgmanifest.json (#18036) * Update cgmanifest.json * Update findMissingNotices.ps1 --- tools/cgmanifest.json | 3 ++- tools/findMissingNotices.ps1 | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/cgmanifest.json b/tools/cgmanifest.json index a290afb3c..1c67fd781 100644 --- a/tools/cgmanifest.json +++ b/tools/cgmanifest.json @@ -1430,5 +1430,6 @@ }, "DevelopmentDependency": false } - ] + ], + "$schema": "https://json.schemastore.org/component-detection-manifest.json" } diff --git a/tools/findMissingNotices.ps1 b/tools/findMissingNotices.ps1 index 658e95212..c7a6514d7 100644 --- a/tools/findMissingNotices.ps1 +++ b/tools/findMissingNotices.ps1 @@ -275,7 +275,11 @@ foreach ($runtime in "win7-x64", "linux-x64", "osx-x64", "alpine-x64", "win-arm" $newRegistrations = $registrations.Keys | Sort-Object | ForEach-Object { $registrations[$_] } $count = $newRegistrations.Count -$newJson = @{Registrations = $newRegistrations } | ConvertTo-Json -depth 99 +$newJson = @{ + Registrations = $newRegistrations + '$schema' = "https://json.schemastore.org/component-detection-manifest.json" +} | ConvertTo-Json -depth 99 + if ($Fix -and $registrationChanged) { $newJson | Set-Content $cgManifestPath Set-GWVariable -Name CGMANIFEST_PATH -Value $cgManifestPath