Add JSON Schema
I would like to include a JSON Schema for the blackbox.yml so that editing the file is easier in editors like VS Code.
PRs welcome 🙏🏼
I have a schema I wrote in Typebox, which is a schema generator in Typescript. The main issue is that it generates a lot of duplicate definitions since it uses references in Typescript.
Source: https://github.com/PythonCoderAS/schemas/tree/master/schemas/blackbox
Generated JSON: https://pythoncoderas.github.io/schemas/schemas/blackbox/schema.json
not sure if I understand this? I was thinking more in terms of a code change in blackbox exporter where schema generation is automated using json tags in the config struct.
also, I would like to better understand how it would be used? and what use-cases it will solve?
also, I would like to better understand how it would be used? and what use-cases it will solve?
It makes editing the config much easier, since it shows up like this in the editor:
cool, I am open to it, but it should be generated from the code, and it shouldn't need to be maintained manually. automation will ensure that it stays updated and doesn't drift over time.
You probably want something like https://github.com/invopop/jsonschema