Skip to content

Instantly share code, notes, and snippets.

@vitiko
Last active July 13, 2021 13:48
Show Gist options
  • Save vitiko/4f260dc1600c96765c4e6f8c88f72507 to your computer and use it in GitHub Desktop.
Save vitiko/4f260dc1600c96765c4e6f8c88f72507 to your computer and use it in GitHub Desktop.
.: generate
generate:
@protoc --version
@echo "commercial paper schema proto generation"
@protoc -I=./schema/ \
-I=../../vendor \
--go_out=./schema/ \
--govalidators_out=./schema/ \
--doc_out=./schema/ --doc_opt=markdown,schema.md \
./schema/schema.proto
@echo "commercial paper service proto generation"
@protoc -I=./service/ \
-I=../../../../../ \
-I=../../vendor \
-I=../../third_party/googleapis \
--go_out=plugins=grpc:./service/ \
--cc-gateway_out=logtostderr=true:./service/ \
--grpc-gateway_out=logtostderr=true:./service/ \
--swagger_out=logtostderr=true:./service/ \
-doc_out=./service/ --doc_opt=markdown,service.md \
./service/service.proto
@uraldav
Copy link

uraldav commented Jul 13, 2021

--swagger_out=... needs to be replaced with --openapiv2_out=... cause -grpc-ecosystem/grpc-gateway@2ee1c8c

--go_out=plugins=grpc: -> --go_out=... ----go-grpc_out=...--go_out: protoc-gen-go: plugins are not supported; use 'protoc --go-grpc_out=...' to generate gRPC

@uraldav
Copy link

uraldav commented Jul 13, 2021

-doc_out=... must be double dashed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment