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

Enhance json schema #353

Merged

Conversation

EmilyGraceSeville7cf
Copy link
Contributor

  • enable intellisence for programs/*.json configs
  • add repo url to schema hints
  • add examples for properties
  • disallow space only strings for properties

Provide:
- examples
- better descriptions
- url to repo

Disallow:
- space only strings
@b3nj5m1n
Copy link
Owner

b3nj5m1n commented Feb 4, 2024

First of all, this is very cool, thank you for implementing it!

I believe the failed unit test is because some of the program configs don't follow the stricter rules you've specified. (Mainly that the help can't be empty)

Here's the list of failing configs:

programs/bazaar.json: fail: files.0.help: Must not validate the schema (not)
programs/antimicrox.json: fail: files.0.help: String length must be greater than or equal to 1
programs/antimicrox.json: fail: files.1.help: String length must be greater than or equal to 1
programs/steam.json: fail: files.0.help: String length must be greater than or equal to 1
programs/steam.json: fail: files.1.help: String length must be greater than or equal to 1
programs/expo.json: fail: files.0.help: String length must be greater than or equal to 1
programs/ledger.json: fail: files.0.help: Must not validate the schema (not)
programs/mysql.json: fail: files.0.help: String length must be greater than or equal to 1
programs/mysql.json: fail: files.1.help: String length must be greater than or equal to 1
programs/tlauncher.json: fail: files.0.help: String length must be greater than or equal to 1
programs/tlauncher.json: fail: files.1.help: String length must be greater than or equal to 1

I'll try to fix these, but it may take me a while since exams are coming up. If anyone wants to help, just update the help sections in those configs so they're not empty anymore and submit a PR for them.

@b3nj5m1n b3nj5m1n added enhancement New feature or request help wanted labels Feb 4, 2024
@EmilyGraceSeville7cf
Copy link
Contributor Author

EmilyGraceSeville7cf commented Feb 6, 2024

I'll try to fix these, but it may take me a while since exams are coming up. If anyone wants to help, just update the help sections in those configs so they're not empty anymore and submit a PR for them.

As a quick workaround (as I don't know your code internals) I've added a new suggested value Not provided for cases a user doesn't know how to fill files.<file>.help. And fixed all of this errors like this. Somebody should update all such placeholders later.

@b3nj5m1n
Copy link
Owner

Should be fixed with #374, could you update your branch?

@EmilyGraceSeville7cf
Copy link
Contributor Author

@b3nj5m1n, I did it. ;)

@b3nj5m1n
Copy link
Owner

Alright, I think we're good to go, thank you again for this!

@b3nj5m1n b3nj5m1n merged commit 7b84d6d into b3nj5m1n:main Feb 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants