Skip to content

Commit 8077515

Browse files
woraachew22
authored andcommitted
Update README.md
Point users to the proto definition instead of Service Management API documentation. Latter is generated from former, and is more likely to be out of date. Rephrase "custom options" to "google.api.http" annotation to be more straight forward.
1 parent 7916b03 commit 8077515

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
grpc-gateway is a plugin of [protoc](http://github.com/google/protobuf).
66
It reads [gRPC](http://github.com/grpc/grpc-common) service definition,
77
and generates a reverse-proxy server which translates a RESTful JSON API into gRPC.
8-
This server is generated according to [custom options](https://cloud.google.com/service-management/reference/rpc/google.api#http) in your gRPC definition.
8+
This server is generated according to the
9+
[`google.api.http`](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L46)
10+
annotation in your gRPC service definition.
911

1012
It helps you to provide your APIs in both gRPC and RESTful style at the same time.
1113

@@ -20,7 +22,7 @@ However, you might still want to provide a traditional RESTful API as well. Reas
2022
This project aims to provide that HTTP+JSON interface to your gRPC service. A small amount of configuration in your service to attach HTTP semantics is all that's needed to generate a reverse-proxy with this library.
2123

2224
## Installation
23-
First you need to install ProtocolBuffers 3.0.0-beta-3 or later.
25+
First you need to install ProtocolBuffers 3.0.0 or later.
2426

2527
```sh
2628
mkdir tmp
@@ -59,7 +61,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
5961
rpc Echo(StringMessage) returns (StringMessage) {}
6062
}
6163
```
62-
2. Add a [custom option](https://cloud.google.com/service-management/reference/rpc/google.api#http) to the .proto file
64+
2. Add a [`google.api.http`](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto#L46) to your .proto file
6365

6466
your_service.proto:
6567
```diff
@@ -83,7 +85,7 @@ Make sure that your `$GOPATH/bin` is in your `$PATH`.
8385
}
8486
```
8587

86-
If you do not want to modify the proto file for use with grpc-gateway you can alternatively use an external [gRPC API Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) file. [Check our documentation](https://grpc-ecosystem.github.io/grpc-gateway/docs/grpcapiconfiguration.html) for more information.
88+
If you do not want to modify the proto file for use with grpc-gateway you can alternatively use an external [gRPC Service Configuration](https://cloud.google.com/endpoints/docs/grpc/grpc-service-config) file. [Check our documentation](https://grpc-ecosystem.github.io/grpc-gateway/docs/grpcapiconfiguration.html) for more information.
8789

8890
3. Generate gRPC stub
8991

0 commit comments

Comments
 (0)