Generate JSON schema for agent configuration
For editor support and other use cases it would be great to have a JSON schema for at least the agent configuration.
We could use https://github.com/chrusty/protoc-gen-jsonschema to generate it, like so:
protoc \
--jsonschema_out'=messages=[AgentConfiguration]:jsonschemas/' \
--proto_path=$(go env GOPATH)/pkg/mod/github.com/envoyproxy/protoc-gen-validate@v1.0.2 \
--proto_path=./pkg/agentcfg/ \
./pkg/agentcfg/agentcfg.proto
... but actually make it part of the bazel build. That is, creating a custom rule (I don't think that there is one in Bazel's Protobuffer rules) for this protoc
.
Edited by Timo Furrer