Closed emouawad closed 7 months ago
Hey there!
I generated a JSON Schema for dashboards (see #254). Haven't spent too much time verifying that the schema is 100% accurate though, but it's probably still better than nothing (I actually expect it not to be completely accurate, especially when it comes to required/non-required fields and oneOf declarations)
You should be able to use it in vscode with:
# yaml-language-server: $schema=https://raw.githubusercontent.com/K-Phoen/grabana/master/schemas/dashboard.json
Thanks I really appreciate the work that has been put into this - would it be possible also to generate a schema for DARK as well?
Note sure if it exists - but a yaml schema for validation would be useful for writing dashboards / alerts easily for new users. That way in editors such as vscode one would get intellisense and errors when the yaml doesn't match the schema.
for reference vscode can pick up the schmea using smthg like: