Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We have a schema for .ckan files, which the Inflator uses to validate metadata.
Discord user Danny2462 pointed out that you can also get vscode to autocomplete according to a JSON schema, so I set that up for .ckan files in KSP-CKAN/CKAN-meta@1e59d3d and KSP-CKAN/KSP2-CKAN-meta@4409012.
Usually .ckans are autogenerated while hand-editing is for .netkans, so .netkans would benefit more from this. However,
CKAN.schema
doesn't have the additionalx_netkan_*
properties, and it requires properties that are optional in .netkan files, so we can't use the same schema for both repos.Changes
Now
NetKAN.schema
is created based on the documentation in the spec. It uses$ref
to borrow the shared properties fromCKAN.schema
. Once this is available, we can set up vscode to use it in the NetKAN repos.Fixes KSP-CKAN/xKAN-meta_testing#14.