Tim Burks
1 min readNov 7, 2019

--

Great job, Lorenz!

Another useful thing that people can do is use protoc-gen-swagger from the grpc-gateway project to generate an OpenAPI description of a transcoded REST API. To do that, first install protoc-gen-swagger:

go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger

Then run it as a protoc plugin:

protoc --proto_path=${ANNOTATIONS} --proto_path=.bookstore.proto --swagger_out=logtostderr=true:.

There should then be a file named bookstore.swagger.json with the OpenAPI description of this sample API.

--

--

Tim Burks

Software developer in the SF Bay area. Electronic Design Automation, iOS apps, and now API tools for the world’s largest computer.