Install openapi2proto
go get -u github.com/NYTimes/openapi2proto/cmd/openapi2protoInstall protobuff, grpc https://grpc.io/docs/quickstart/go/
$ go get -u google.golang.org/grpc
$ go get -u github.com/golang/protobuf/protoc-gen-goGenerate protobuf code (*.proto)
openapi2proto -spec spec_file.yaml -annotate > output.protoGenerate grpc code (*.pb.go)
protoc -I/usr/local/include -I. \
-I$GOPATH/src \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=plugins=grpc:. \
./path/to/*.protoGenerate grpc gateway code (*.pb.gw.go)
protoc -I/usr/local/include -I. \
-I$GOPATH/src \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true:. \
./path/to/*.proto