Skip to content

Commit

Permalink
Fix schema issue with install_to: GameData/Mods (#3887)
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Aug 21, 2023
1 parent 858d71f commit 12fbb72
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CKAN.schema
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
12 changes: 12 additions & 0 deletions Tests/NetKAN/Validators/ObeysCKANSchemaValidatorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12fbb72

Please sign in to comment.