lnrpc: extract or add REST annotations to yaml

This commit is contained in:
Oliver Gugger committed 2020-06-04 08:50:00 +02:00
1 parent 3ef41dd198
commit fe16be5bb8
39 files changed
+11341 -1410

No files matched your search

+3 -5
View File
@@ -12,19 +12,17 @@ for file in $PROTOS; do
# Generate the protos.
protoc -I/usr/local/include -I. \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--go_out=plugins=grpc,paths=source_relative:. \
"${file}"
# Generate the REST reverse proxy.
protoc -I/usr/local/include -I. \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--grpc-gateway_out=logtostderr=true,paths=source_relative:. \
--grpc-gateway_out=logtostderr=true,paths=source_relative,grpc_api_configuration=rest-annotations.yaml:. \
"${file}"
# Finally, generate the swagger file which describes the REST API in detail.
protoc -I/usr/local/include -I. \
-I$GOPATH/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis \
--swagger_out=logtostderr=true:. \
--swagger_out=logtostderr=true,grpc_api_configuration=rest-annotations.yaml:. \
"${file}"
done