From a8305def3df044c427cca0b06dc14c965ced2c38 Mon Sep 17 00:00:00 2001 From: Kevin Wan Date: Sun, 7 Aug 2022 11:11:46 +0800 Subject: [PATCH] docs: update docs for gateway (#2236) --- gateway/readme.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gateway/readme.md b/gateway/readme.md index 1fef0bec..e3474f63 100644 --- a/gateway/readme.md +++ b/gateway/readme.md @@ -28,11 +28,12 @@ Upstreams: - Grpc: Etcd: Hosts: - - localhost:2379 + - localhost:2379 Key: hello.rpc # protoset mode - ProtoSet: hello.pb - Mapping: + ProtoSets: + - hello.pb + Mappings: - Method: get Path: /pingHello/:ping RpcPath: hello.Hello/Ping @@ -40,7 +41,7 @@ Upstreams: Endpoints: - localhost:8081 # reflection mode, no ProtoSet settings - Mapping: + Mappings: - Method: post Path: /pingWorld RpcPath: world.World/Ping @@ -48,9 +49,15 @@ Upstreams: ## Generate ProtoSet files -- example command +- example command without external imports ```shell protoc --descriptor_set_out=hello.pb hello.proto ``` +- example command with external imports + +```shell +protoc --include_imports --proto_path=. --descriptor_set_out=hello.pb hello.proto +``` +