iamb icon indicating copy to clipboard operation
iamb copied to clipboard

provide JSON Schema to allow validating config file

Open KiaraGrouwstra opened this issue 10 months ago • 3 comments

We now have a sample config, which helps users get going to tweak their own setup. To further facilitate this, it would be nice to offer a corresponding JSON Schema file. This would then enable validating checks for the config, including by LSP language servers for TOML such as taplo.

It should be possible to generate this using say schemars.

KiaraGrouwstra avatar Feb 23 '25 12:02 KiaraGrouwstra

Can confirm, I get No configured profile with the name "<username>" in .config/iamb/config.json and no clue what to do.

JIbald avatar Aug 07 '25 12:08 JIbald

@JIbald as per your specific configuration issue, you may consider what i used there (click to expand), but yeah some systematic feedback mechanism would be nicer.

default_profile = "foo"
# if not specified uses "default"

[profiles.foo]
user_id = "..."
url = "..."
...

KiaraGrouwstra avatar Aug 07 '25 20:08 KiaraGrouwstra

Thanks for the quick response. I started my own little config, based on your snippet and it worked like a charm. Once again building from the ground up instead of copy 🍝 helps. Thanks.

JIbald avatar Aug 08 '25 07:08 JIbald