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

Define JSON Schemas to put at the top of each JSON file #1336

Closed
2 tasks done
SethFalco opened this issue May 7, 2022 · 0 comments · Fixed by #2099
Closed
2 tasks done

Define JSON Schemas to put at the top of each JSON file #1336

SethFalco opened this issue May 7, 2022 · 0 comments · Fixed by #2099
Labels
enhancement New feature or request

Comments

@SethFalco
Copy link
Contributor

SethFalco commented May 7, 2022

Checklist

  • I'm reporting a feature request
  • I've checked for similar feature requests including closed ones

Description

We maintain quite a few huge JSON files in this repository.
It's not impossible that human-error does it's thing and we have typos in fields, or property values that don't make sense, or accidentally add redundant properties etc.

I think we should make a JSON Schema that validates the contents of the JSON files, and we can define them at $schema.

This will:

  1. Add code completion and validation on IDEs and code editors when contributors modify the file, vastly improving the contribution experience.
  2. Allow us to strictly define and document all rules / properties that can be set in the JSON files.
  3. Maybe later we can add a validation step in CI to ensure the schema matches. (Maybe this could be in code as well for when users use a custom JSON file via the --json argument.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant