Skip to content

Commit 4ad9e40

Browse files
authored
Update description for 1.10 schema (#5014)
1 parent e0c43c4 commit 4ad9e40

File tree

6 files changed

+41
-10
lines changed

6 files changed

+41
-10
lines changed

schemas/JSON/manifests/v1.10.0/manifest.defaultLocale.1.10.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://aka.ms/winget-manifest.defaultlocale.1.9.0.schema.json",
2+
"$id": "https://aka.ms/winget-manifest.defaultlocale.1.10.0.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.9.0",
4+
"description": "A representation of a multiple-file manifest representing a default app metadata in the OWC. v1.10.0",
55
"definitions": {
66
"Url": {
77
"type": [ "string", "null" ],

schemas/JSON/manifests/v1.10.0/manifest.installer.1.10.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://aka.ms/winget-manifest.installer.1.9.0.schema.json",
2+
"$id": "https://aka.ms/winget-manifest.installer.1.10.0.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"description": "A representation of a single-file manifest representing an app installers in the OWC. v1.9.0",
4+
"description": "A representation of a single-file manifest representing an app installers in the OWC. v1.10.0",
55
"definitions": {
66
"PackageIdentifier": {
77
"type": "string",

schemas/JSON/manifests/v1.10.0/manifest.locale.1.10.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://aka.ms/winget-manifest.locale.1.9.0.schema.json",
2+
"$id": "https://aka.ms/winget-manifest.locale.1.10.0.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.9.0",
4+
"description": "A representation of a multiple-file manifest representing app metadata in other locale in the OWC. v1.10.0",
55
"definitions": {
66
"Url": {
77
"type": [ "string", "null" ],

schemas/JSON/manifests/v1.10.0/manifest.singleton.1.10.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://aka.ms/winget-manifest.singleton.1.9.0.schema.json",
2+
"$id": "https://aka.ms/winget-manifest.singleton.1.10.0.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"description": "A representation of a single-file manifest representing an app in the OWC. v1.9.0",
4+
"description": "A representation of a single-file manifest representing an app in the OWC. v1.10.0",
55
"definitions": {
66
"PackageIdentifier": {
77
"type": "string",

schemas/JSON/manifests/v1.10.0/manifest.version.1.10.0.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"$id": "https://aka.ms/winget-manifest.version.1.9.0.schema.json",
2+
"$id": "https://aka.ms/winget-manifest.version.1.10.0.schema.json",
33
"$schema": "http://json-schema.org/draft-07/schema#",
4-
"description": "A representation of a multi-file manifest representing an app version in the OWC. v1.9.0",
4+
"description": "A representation of a multi-file manifest representing an app version in the OWC. v1.10.0",
55
"type": "object",
66
"properties": {
77
"PackageIdentifier": {

src/AppInstallerCLITests/YamlManifest.cpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,6 +1386,37 @@ TEST_CASE("WriteV1_9SingletonManifestAndVerifyContents", "[ManifestCreation]")
13861386
VerifyV1ManifestContent(generatedMultiFileManifest, false, ManifestVer{ s_ManifestVersionV1_9 }, true);
13871387
}
13881388

1389+
TEST_CASE("WriteV1_10SingletonManifestAndVerifyContents", "[ManifestCreation]")
1390+
{
1391+
TempDirectory singletonDirectory{ "SingletonManifest" };
1392+
CopyTestDataFilesToFolder({ "ManifestV1_10-Singleton.yaml" }, singletonDirectory);
1393+
Manifest singletonManifest = YamlParser::CreateFromPath(singletonDirectory);
1394+
1395+
TempDirectory exportedSingletonDirectory{ "exportedSingleton" };
1396+
std::filesystem::path generatedSingletonManifestPath = exportedSingletonDirectory.GetPath() / "testSingletonManifest.yaml";
1397+
YamlWriter::OutputYamlFile(singletonManifest, singletonManifest.Installers[0], generatedSingletonManifestPath);
1398+
1399+
REQUIRE(std::filesystem::exists(generatedSingletonManifestPath));
1400+
Manifest generatedSingletonManifest = YamlParser::CreateFromPath(exportedSingletonDirectory);
1401+
VerifyV1ManifestContent(generatedSingletonManifest, true, ManifestVer{ s_ManifestVersionV1_10 }, true);
1402+
1403+
TempDirectory multiFileDirectory{ "MultiFileManifest" };
1404+
CopyTestDataFilesToFolder({
1405+
"ManifestV1_10-MultiFile-Version.yaml",
1406+
"ManifestV1_10-MultiFile-Installer.yaml",
1407+
"ManifestV1_10-MultiFile-DefaultLocale.yaml",
1408+
"ManifestV1_10-MultiFile-Locale.yaml" }, multiFileDirectory);
1409+
1410+
Manifest multiFileManifest = YamlParser::CreateFromPath(multiFileDirectory);
1411+
TempDirectory exportedMultiFileDirectory{ "exportedMultiFile" };
1412+
std::filesystem::path generatedMultiFileManifestPath = exportedMultiFileDirectory.GetPath() / "testMultiFileManifest.yaml";
1413+
YamlWriter::OutputYamlFile(multiFileManifest, multiFileManifest.Installers[0], generatedMultiFileManifestPath);
1414+
1415+
REQUIRE(std::filesystem::exists(generatedMultiFileManifestPath));
1416+
Manifest generatedMultiFileManifest = YamlParser::CreateFromPath(exportedMultiFileDirectory);
1417+
VerifyV1ManifestContent(generatedMultiFileManifest, false, ManifestVer{ s_ManifestVersionV1_10 }, true);
1418+
}
1419+
13891420
TEST_CASE("WriteManifestWithMultipleLocale", "[ManifestCreation]")
13901421
{
13911422
Manifest multiLocaleManifest = YamlParser::CreateFromPath(TestDataFile("Manifest-Good-MultiLocale.yaml"));

0 commit comments

Comments
 (0)