build/proto_docs: add proto documentation generator
This adds an HTML documentation generator for our Protobuf files.
It consists of a new Bazel rule `proto_docs` which wraps protoc-gen-doc.
protoc-gen-doc itself and go-proto-validator which it includes need
some light patching because of dumbness in the Go Proto ecosystem that
doesn't exist in our Bazel build.
This just hooks up everything, it does not yet do anything custom like
annotating our own authorization metadata or similar.
Change-Id: If6fd7c777210fea700e49242b5339cfafe7c030d
Reviewed-on: https://review.monogon.dev/c/monogon/+/452
Reviewed-by: Leopold Schabel <leo@nexantic.com>
diff --git a/metropolis/proto/BUILD b/metropolis/proto/BUILD
new file mode 100644
index 0000000..45aa830
--- /dev/null
+++ b/metropolis/proto/BUILD
@@ -0,0 +1,9 @@
+load("//build/proto_docs:proto_docs.bzl", "proto_docs")
+
+proto_docs(
+ name = "docs",
+ protos = [
+ "//metropolis/proto/api:api_proto",
+ "//metropolis/proto/common:common_proto",
+ ],
+)