From e26a9f25a9c257332e912ed319ec12f498174046 Mon Sep 17 00:00:00 2001 From: Henry Kwan Date: Wed, 12 Aug 2020 22:14:46 +0800 Subject: [PATCH] as requested, reference to #1578 copy paste from https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/f3b7d47220131ec67b59d0e44539d58cc76ac61e/docs/_docs/grpcapiconfiguration.md to v2 branch as requested. --- docs/_docs/grpcapiconfiguration.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/_docs/grpcapiconfiguration.md b/docs/_docs/grpcapiconfiguration.md index 0c0846aa777..2c358630565 100644 --- a/docs/_docs/grpcapiconfiguration.md +++ b/docs/_docs/grpcapiconfiguration.md @@ -64,4 +64,11 @@ The following is equivalent to the basic [usage example](usage.html) but without This will generate a reverse proxy `gen/go/your/service/v1/your_service.pb.gw.go` that is identical to the one produced for the annotated proto. +6. Generate the optional your_service.swagger.json + + ```sh + protoc -I. --swagger_out=grpc_api_configuration=path/to/your_service.yaml:./gen/go \ + your/service/v1/your_service.proto + ``` + All other steps work as before. If you want you can remove the googleapis include path in step 3 and 4 as the unannotated proto no longer requires them.