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" ] 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