From 34f8670697ceb63979ea13706cd06600773e9331 Mon Sep 17 00:00:00 2001 From: HebaruSan Date: Mon, 21 Aug 2023 20:55:24 +0000 Subject: [PATCH 1/2] Update CKAN.schema --- CKAN.schema | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CKAN.schema b/CKAN.schema index e2fd249e06..085d57ab1a 100644 --- a/CKAN.schema +++ b/CKAN.schema @@ -432,7 +432,7 @@ }, "install_to" : { "description" : "Where file should be installed to. As of v1.2, GameData may take a path", - "oneOf" : [ + "anyOf" : [ { "description" : "Spec version 1 targets", "enum" : [ "GameData", "Ships", "GameRoot", "Tutorial", "Scenarios" ] From 99bf38a9a294a7a7afda3c7cc84bf7c8e5fbe7ca Mon Sep 17 00:00:00 2001 From: HebaruSan Date: Mon, 21 Aug 2023 21:12:19 +0000 Subject: [PATCH 2/2] Add test for install_to: GameData/Mods --- .../Validators/ObeysCKANSchemaValidatorTests.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs b/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs index 23580a009d..386db6c2dc 100644 --- a/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs +++ b/Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs @@ -52,6 +52,18 @@ public void Validate_DuplicateLocalizations_Throws(string json, string localizat ); } + public void Validate_InstallToGameDataSlashmods_DoesNotThrow() + { + Assert.DoesNotThrow( + () => TryModule(boringModule, null, "install", + JArray.Parse(@"[ + { + ""find"": ""BetterPartsManager"", + ""install_to"": ""GameData/Mods"" + } + ]"))); + } + private void TryModule(string json, string removeProperty = null, string addProperty = null, JToken addPropertyValue = null) { // Arrange