Skip to content

Commit ae2eadc

Browse files
committed
Merge remote-tracking branch 'origin/master' into swagger_descriptions
2 parents 761d8bc + 8f479af commit ae2eadc

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,12 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
181181
path/to/your_service.proto
182182
```
183183
184+
## Parameters and flags
185+
`protoc-gen-grpc-gateway` supports custom mapping from Protobuf `import` to Golang import path.
186+
They are compatible to [the parameters with same names in `protoc-gen-go`](https://github.com/golang/protobuf#parameters).
187+
188+
`protoc-gen-grpc-gateway` also supports some more command line flags to control logging. You can give these flags together with parameters above. Run `protoc-gen-grpc-gateway --help` for more details about the flags.
189+
184190
## More Examples
185191
More examples are available under `examples` directory.
186192
* `examplepb/echo_service.proto`, `examplepb/a_bit_of_everything.proto`: service definition
@@ -198,11 +204,13 @@ More examples are available under `examples` directory.
198204
* Mapping streaming APIs to JSON streams
199205
* Mapping HTTP headers with `Grpc-Metadata-` prefix to gRPC metadata
200206
* Optionally emitting API definition for [Swagger](http://swagger.io).
207+
* Import path parameters compatible to protoc-gen-go.
201208
202209
### Want to support
203210
But not yet.
204211
* bytes and enum fields in path parameter. #5
205212
* Optionally generating the entrypoint. #8
213+
* `import_path` parameter
206214
207215
### No plan to support
208216
But patch is welcome.

protoc-gen-grpc-gateway/main.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
// Command protoc-gen-grpc-gateway is a plugin for Google protocol buffer
2+
// compiler to generate a reverse-proxy, which converts incoming RESTful
3+
// HTTP/1 requests gRPC invocation.
4+
// You rarely need to run this program directly. Instead, put this program
5+
// into your $PATH with a name "protoc-gen-grpc-gateway" and run
6+
// protoc --grpc-gateway_out=output_directory path/to/input.proto
7+
//
8+
// See README.md for more details.
19
package main
210

311
import (

0 commit comments

Comments
 (0)