From 0829269d5a2db11e925498bf196c0cc233076ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrique=20Garc=C3=ADa=20Cota?= Date: Mon, 27 Jul 2020 17:47:52 +0200 Subject: [PATCH] docs(grpc-gateway) fix helloservice proto in README (#7) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f663d2b5efa..b2864036f5c 100644 --- a/README.md +++ b/README.md @@ -65,9 +65,9 @@ package hello; service HelloService { rpc SayHello(HelloRequest) returns (HelloResponse) { option (google.api.http) = { - get: "/v1/messages/{name}" + get: "/v1/messages/{greeting}" additional_bindings { - get: "/v1/messages/legacy/{name=**}" + get: "/v1/messages/legacy/{greeting=**}" } post: "/v1/messages/" body: "*" @@ -78,7 +78,7 @@ service HelloService { // The request message containing the user's name. message HelloRequest { - string name = 1; + string greeting = 1; } // The response message containing the greetings @@ -101,7 +101,7 @@ curl -XGET localhost:8000/v1/messages/legacy/Kong2.0 curl -XGET localhost:8000/v1/messages/legacy/Kong2.0/more/paths {"message":"Hello Kong2.0\/more\/paths"} -curl -XPOST localhost:8000/v1/messages/Kong2.0 -d '{"name":"kong2.0"}' +curl -XPOST localhost:8000/v1/messages/Kong2.0 -d '{"greeting":"kong2.0"}' {"message":"Hello kong2.0"} ```