winget-cli
winget-cli copied to clipboard
`winget validate` does not recognize `$schema` field for JSON manifests
Brief description of your issue
winget validate
throws warnings when the $schema
field is defined for JSON manifests.
Steps to reproduce
Taking an example of singleton manifest for easier repro, but the same applies for multifile manifests
{
"$schema": "https://aka.ms/winget-manifest.singleton.1.5.0.schema.json",
"PackageIdentifier": "jqlang.jq",
"PackageVersion": "1.2.3",
"PackageLocale": "en-US",
"Publisher": "TestPublisher",
"PackageName": "Full Singleton 1.5 Test",
"PackageUrl": "https://fakeTestUrl.com",
"License": "MIT",
"ShortDescription": "A manifest used to verify that all fields from a full 1.5 singleton manifest can be deserialized and updated.",
"Installers": [
{
"MinimumOSVersion": "10.0.0.0",
"Architecture": "x64",
"InstallerUrl": "https://fakedomain.com/WingetCreateTestExeInstaller.exe",
"InstallerType": "inno",
"InstallerSha256": "A7803233EEDB6A4B59B3024CCF9292A6FFFB94507DC998AA67C5B745D197A5DC"
}
],
"ManifestType": "singleton",
"ManifestVersion": "1.5.0"
}
Expected behavior
Manifest validation succeeds with no warnings.
Actual behavior
~/1.2.3 winget validate --manifest .
Manifest validation succeeded with warnings.
Manifest Warning: Unknown field. [$schema] Line: 3, Column: 1
Environment
Windows Package Manager (Preview) v1.7.3481-preview
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22621.3007
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.3481.0
Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Enabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Enabled
LocalArchiveMalwareScanOverride Disabled