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

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Aug 21, 2023

Problem

KSP-CKAN/KSP2-NetKAN#81

install:
  - find: BetterPartsManager
    install_to: GameData/Mods

https://github.com/KSP-CKAN/KSP2-NetKAN/actions/runs/5930964431/job/16081829297

image

Cause

https://cswr.github.io/JsonSchema/spec/generic_keywords/

image

GameData/Mods is too correct; it matches both of these:

CKAN/CKAN.schema

Lines 440 to 444 in 858d71f

{
"description" : "Spec v1.2 GameData path",
"type" : "string",
"pattern" : "^GameData/"
},

CKAN/CKAN.schema

Lines 460 to 463 in 858d71f

{
"description" : "KSP2 default mods folder",
"enum" : [ "GameData/Mods" ]
},

And the tooling apparently doesn't like that. How this could ever possibly be useful is quite beyond me.

Changes

I want to keep the explicit definition of the KSP2 default folder independent of what happens elsewhere in the list, so now the install_to part uses anyOf instead of oneOf, which will allow more than one match.

image

FYI to @NathanPeake.

@HebaruSan HebaruSan added Bug Easy This is easy to fix Netkan Issues affecting the netkan data Schema Issues affecting the schema labels Aug 21, 2023
@HebaruSan HebaruSan changed the title Update CKAN.schema Fix schema issue with install_to: GameData/Mods Aug 21, 2023
@HebaruSan

This comment was marked as resolved.

@HebaruSan HebaruSan added In progress We're still working on this Tests Issues affecting the internal tests labels Aug 21, 2023
@HebaruSan HebaruSan merged commit 12fbb72 into master Aug 21, 2023
10 checks passed
@HebaruSan HebaruSan deleted the fix/schema-install-to branch August 21, 2023 21:25
@HebaruSan
Copy link
Member Author

Seems to work.

https://github.com/KSP-CKAN/KSP2-NetKAN/actions/runs/5930964431/job/16084267518

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Easy This is easy to fix In progress We're still working on this Netkan Issues affecting the netkan data Schema Issues affecting the schema Tests Issues affecting the internal tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant