commit 4ad9e4035e68a6a043f9fb7b2c74ed3fa9e9fa0e
parent e0c43c4047096977d49a3338e49d6682c34067cd
Author: Ryan <69221034+ryfu-msft@users.noreply.github.com>
Date: Tue, 3 Dec 2024 19:14:09 -0500
Update description for 1.10 schema (#5014)
Diffstat:
6 files changed, 41 insertions(+), 10 deletions(-)
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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"));