Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a json schema for the configuration #8644

Closed
wants to merge 2 commits into from

Conversation

jneem
Copy link
Contributor

@jneem jneem commented Oct 27, 2023

Automatically derives a json schema from the configuration struct. This uses the schemars crate which checks the serde annotations to make sure that, e.g., names are correctly renamed to kebab-case.

I added a little binary to generate the schema as a text file. I'm not sure what to do with the result (e.g. maybe it should be automatically built and uploaded somewhere as part of a release).

This should basically fix #2894, as taplo apparently supports autocompleting from json schemas.

@pascalkuthe
Copy link
Member

there was a past PR for this where it turned out that achieving generally correct schemas requires a bunch of effort.

Since the TOML config will be removed in the future I don't think it makes sense to invest that effort: #3901 (comment)

@pascalkuthe
Copy link
Member

#6174 for reference

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

config.toml autocomplete
2 participants