[GH-ISSUE #541] Feature: JSON Schema for Config #5800

Closed
opened 2026-05-23 01:53:06 +01:00 by JakeStanger · 6 comments
Owner

Originally created by @LeSnake04 on GitHub (Apr 14, 2024).
Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/541

Is your feature request related to a problem? Please describe.
Configuration files currently can only be checked for syntax errors with taplo

Describe the solution you'd like
Add an official syntax to the json schema store: https://taplo.tamasfe.dev/configuration/developing-schemas.html

Describe alternatives you've considered
None

Additional context
Pushing the json schema might also allow more lsps to check the config.

Originally created by @LeSnake04 on GitHub (Apr 14, 2024). Original GitHub issue: https://github.com/JakeStanger/ironbar/issues/541 **Is your feature request related to a problem? Please describe.** Configuration files currently can only be checked for syntax errors with taplo **Describe the solution you'd like** Add an official syntax to the json schema store: https://taplo.tamasfe.dev/configuration/developing-schemas.html **Describe alternatives you've considered** None **Additional context** Pushing the json schema might also allow more lsps to check the config.
Author
Owner

@yavko commented on GitHub (Apr 14, 2024):

Yaml also has a schema, and maybe others do too

<!-- gh-comment-id:2054219465 --> @yavko commented on GitHub (Apr 14, 2024): Yaml also has a schema, and maybe others do too
Author
Owner

@LeSnake04 commented on GitHub (Apr 15, 2024):

Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough

<!-- gh-comment-id:2054230796 --> @LeSnake04 commented on GitHub (Apr 15, 2024): Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough
Author
Owner

@LeSnake04 commented on GitHub (Apr 15, 2024):

Im not 100% sure its possible to filter for ironbar/config.toml though. I couldnt find a json schema filtering by parent folder so far.

Edit: It Might be possible with regexmatch

<!-- gh-comment-id:2055543133 --> @LeSnake04 commented on GitHub (Apr 15, 2024): Im not 100% sure its possible to filter for ironbar/config.toml though. I couldnt find a json schema filtering by parent folder so far. Edit: It Might be possible with regexmatch
Author
Owner

@yavko commented on GitHub (Apr 15, 2024):

Found a library for this https://graham.cool/schemars/

<!-- gh-comment-id:2055641374 --> @yavko commented on GitHub (Apr 15, 2024): Found a library for this https://graham.cool/schemars/
Author
Owner

@JakeStanger commented on GitHub (Apr 15, 2024):

Happy to add this, hopefully it should be a relatively straightforward build step to produce and export the schema.

Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough

Yes I'm pretty sure the other formats just adopted the JSON schema format, so that should tick all the boxes. Corn may or may not eventually receive support too.

<!-- gh-comment-id:2056406515 --> @JakeStanger commented on GitHub (Apr 15, 2024): Happy to add this, hopefully it should be a relatively straightforward build step to produce and export the schema. > Taplo is a toml lsp but it uses json schemas to define lints, so json might be enough Yes I'm pretty sure the other formats just adopted the JSON schema format, so that should tick all the boxes. Corn may or may not [eventually](https://github.com/corn-config/corn/issues/11) receive support too.
Author
Owner

@JakeStanger commented on GitHub (May 31, 2024):

I'm now generating and hosting schemas, meaning you can now add

"$schema": "https://f.jstanger.dev/github/ironbar/schema.json",

to your JSON/YAML config to follow master.

For tagged releases, starting with 0.16.0 when that releases, you will be able to use schema-v0.16.0.json.

<!-- gh-comment-id:2142986350 --> @JakeStanger commented on GitHub (May 31, 2024): I'm now generating and hosting schemas, meaning you can now add ```json "$schema": "https://f.jstanger.dev/github/ironbar/schema.json", ``` to your JSON/YAML config to follow master. For tagged releases, starting with 0.16.0 when that releases, you will be able to use `schema-v0.16.0.json`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
JakeStanger/ironbar#5800
No description provided.