diff --git a/schemas/JSON/manifests/v1.10.0/manifest.defaultLocale.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.defaultLocale.1.10.0.json index c1be7ab447..2713d87b71 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.defaultLocale.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.defaultLocale.1.10.0.json @@ -1,7 +1,7 @@ { - "$id": "https://aka.ms/winget-manifest.defaultlocale.1.9.0.schema.json", + "$id": "https://aka.ms/winget-manifest.defaultlocale.1.10.0.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.9.0", + "description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.10.0", "definitions": { "Url": { "type": [ "string", "null" ], diff --git a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json index c64358a9e0..98da3b2c34 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json @@ -1,7 +1,7 @@ { - "$id": "https://aka.ms/winget-manifest.installer.1.9.0.schema.json", + "$id": "https://aka.ms/winget-manifest.installer.1.10.0.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "A representation of a single-file manifest representing an app installers in the OWC. v1.9.0", + "description": "A representation of a single-file manifest representing an app installers in the OWC. v1.10.0", "definitions": { "PackageIdentifier": { "type": "string", diff --git a/schemas/JSON/manifests/v1.10.0/manifest.locale.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.locale.1.10.0.json index 98e28826dd..35e7db70fc 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.locale.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.locale.1.10.0.json @@ -1,7 +1,7 @@ { - "$id": "https://aka.ms/winget-manifest.locale.1.9.0.schema.json", + "$id": "https://aka.ms/winget-manifest.locale.1.10.0.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.9.0", + "description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.10.0", "definitions": { "Url": { "type": [ "string", "null" ], diff --git a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json index 084bafedd5..dd48208c79 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json @@ -1,7 +1,7 @@ { - "$id": "https://aka.ms/winget-manifest.singleton.1.9.0.schema.json", + "$id": "https://aka.ms/winget-manifest.singleton.1.10.0.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "A representation of a single-file manifest representing an app in the OWC. v1.9.0", + "description": "A representation of a single-file manifest representing an app in the OWC. v1.10.0", "definitions": { "PackageIdentifier": { "type": "string", diff --git a/schemas/JSON/manifests/v1.10.0/manifest.version.1.10.0.json b/schemas/JSON/manifests/v1.10.0/manifest.version.1.10.0.json index a57172911e..c682e28122 100644 --- a/schemas/JSON/manifests/v1.10.0/manifest.version.1.10.0.json +++ b/schemas/JSON/manifests/v1.10.0/manifest.version.1.10.0.json @@ -1,7 +1,7 @@ { - "$id": "https://aka.ms/winget-manifest.version.1.9.0.schema.json", + "$id": "https://aka.ms/winget-manifest.version.1.10.0.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", - "description": "A representation of a multi-file manifest representing an app version in the OWC. v1.9.0", + "description": "A representation of a multi-file manifest representing an app version in the OWC. v1.10.0", "type": "object", "properties": { "PackageIdentifier": { diff --git a/src/AppInstallerCLITests/YamlManifest.cpp b/src/AppInstallerCLITests/YamlManifest.cpp index d402596424..65144a8d43 100644 --- a/src/AppInstallerCLITests/YamlManifest.cpp +++ b/src/AppInstallerCLITests/YamlManifest.cpp @@ -1386,6 +1386,37 @@ TEST_CASE("WriteV1_9SingletonManifestAndVerifyContents", "[ManifestCreation]") VerifyV1ManifestContent(generatedMultiFileManifest, false, ManifestVer{ s_ManifestVersionV1_9 }, true); } +TEST_CASE("WriteV1_10SingletonManifestAndVerifyContents", "[ManifestCreation]") +{ + TempDirectory singletonDirectory{ "SingletonManifest" }; + CopyTestDataFilesToFolder({ "ManifestV1_10-Singleton.yaml" }, singletonDirectory); + Manifest singletonManifest = YamlParser::CreateFromPath(singletonDirectory); + + TempDirectory exportedSingletonDirectory{ "exportedSingleton" }; + std::filesystem::path generatedSingletonManifestPath = exportedSingletonDirectory.GetPath() / "testSingletonManifest.yaml"; + YamlWriter::OutputYamlFile(singletonManifest, singletonManifest.Installers[0], generatedSingletonManifestPath); + + REQUIRE(std::filesystem::exists(generatedSingletonManifestPath)); + Manifest generatedSingletonManifest = YamlParser::CreateFromPath(exportedSingletonDirectory); + VerifyV1ManifestContent(generatedSingletonManifest, true, ManifestVer{ s_ManifestVersionV1_10 }, true); + + TempDirectory multiFileDirectory{ "MultiFileManifest" }; + CopyTestDataFilesToFolder({ + "ManifestV1_10-MultiFile-Version.yaml", + "ManifestV1_10-MultiFile-Installer.yaml", + "ManifestV1_10-MultiFile-DefaultLocale.yaml", + "ManifestV1_10-MultiFile-Locale.yaml" }, multiFileDirectory); + + Manifest multiFileManifest = YamlParser::CreateFromPath(multiFileDirectory); + TempDirectory exportedMultiFileDirectory{ "exportedMultiFile" }; + std::filesystem::path generatedMultiFileManifestPath = exportedMultiFileDirectory.GetPath() / "testMultiFileManifest.yaml"; + YamlWriter::OutputYamlFile(multiFileManifest, multiFileManifest.Installers[0], generatedMultiFileManifestPath); + + REQUIRE(std::filesystem::exists(generatedMultiFileManifestPath)); + Manifest generatedMultiFileManifest = YamlParser::CreateFromPath(exportedMultiFileDirectory); + VerifyV1ManifestContent(generatedMultiFileManifest, false, ManifestVer{ s_ManifestVersionV1_10 }, true); +} + TEST_CASE("WriteManifestWithMultipleLocale", "[ManifestCreation]") { Manifest multiLocaleManifest = YamlParser::CreateFromPath(TestDataFile("Manifest-Good-MultiLocale.yaml"));