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

feat: add schemas for the configs #310

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DataM0del
Copy link
Contributor

Description

Note

Hopefully we can make this dynamic / auto-generated later.

Just adds some JSON Schemas, note that, just because it's a JSON schema, doesn't mean that you can't use it with TOML.
image

Testing

Can't test it because this TOML extension won't let me use local schemas... 💀
Could probably implement that in the extension and then test it.

Checklist

Things need to be done before this Pull Request can be merged.

  • Fix the stupid TOML extension
  • Initial schemas (not auto-generated)
  • Test the schemas
  • Make a script to automatically generate these schemas
  • Test it

Hopefully we can make this dynamic / auto-generated later.
@Snowiiii
Copy link
Owner

Im not sure if this is really necessary, We already have to add config values in the docs it would be really annoying to have to add them in 3 different places

@DataM0del
Copy link
Contributor Author

Im not sure if this is really necessary, We already have to add config values in the docs it would be really annoying to have to add them in 3 different places

We could auto-generate the docs from these schemas. Obviously you don't get auto complete from the docs, so it's probably better if we do that instead.

@Snowiiii
Copy link
Owner

Im not sure if this is really necessary, We already have to add config values in the docs it would be really annoying to have to add them in 3 different places

We could auto-generate the docs from these schemas. Obviously you don't get auto complete from the docs, so it's probably better if we do that instead.

I like to have examples and explain in-depth how things work. Which can be done in the docs

@DataM0del
Copy link
Contributor Author

Im not sure if this is really necessary, We already have to add config values in the docs it would be really annoying to have to add them in 3 different places

We could auto-generate the docs from these schemas. Obviously you don't get auto complete from the docs, so it's probably better if we do that instead.

I like to have examples and explain in-depth how things work. Which can be done in the docs

JSON schemas also have the "example" array in each item, so you can give examples like

"properties": {
  "type": "string",
  "examples": ["yes", "awawhawfrjoiwaojif"]
}

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

Successfully merging this pull request may close these issues.

2 participants