Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schema issue with install_to: GameData/Mods #3887

Merged
merged 2 commits into from
Aug 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading