This repository uses Bazel to import protoc-gen-openapiv2 and generate an OpenApiV2 documentation from a proto file.
This was tested on Bazel 4.0.0, but should work on 3.5.0+.
Assuming you have Bazel 4.0.0 installed, just clone this repository and:
$ cd protoc-gen-openapi-bazel-example
$ bazel build //example:openapiv2
Then you can copy the generated file.swagger.json file and paste into https://editor.swagger.io/.