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

Create netkan schema #4254

Merged
merged 1 commit into from
Nov 11, 2024
Merged

Conversation

HebaruSan
Copy link
Member

@HebaruSan HebaruSan commented Nov 9, 2024

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 additional x_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 from CKAN.schema. Once this is available, we can set up vscode to use it in the NetKAN repos.

Fixes KSP-CKAN/xKAN-meta_testing#14.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Netkan Issues affecting the netkan data Schema Issues affecting the schema Documentation Issues affecting documentation labels Nov 9, 2024
@HebaruSan HebaruSan merged commit 3d0e428 into KSP-CKAN:master Nov 11, 2024
3 checks passed
@HebaruSan HebaruSan deleted the feature/netkan-schema branch November 11, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Issues affecting documentation Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data Schema Issues affecting the schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make JSON-Schema for netkan files?
1 participant