From abb5c4491fe62dda4684bdb975ebbc7c04e54cef Mon Sep 17 00:00:00 2001
From: "data-plane-api(CircleCI)" <data-plane-api@users.noreply.github.com>
Date: Tue, 30 Apr 2019 23:52:37 +0000
Subject: [PATCH] Support gRPC-JSON translate without the google.api.http
 option. (#6731)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Description: Support gRPC-JSON translate without the `google.api.http` option.
Risk Level: Low
Testing: Done
Docs Changes: Done
Release Notes: Done

Fixes #3631

Signed-off-by: 吕海涛 <lv@haitao.dev>

Mirrored from https://github.com/envoyproxy/envoy @ 68d8c9e604100e8465498759b86a53a1b9cff1ed
---
 .../http/transcoder/v2/transcoder.proto       | 22 +++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/envoy/config/filter/http/transcoder/v2/transcoder.proto b/envoy/config/filter/http/transcoder/v2/transcoder.proto
index fecd55d6..a7f092d3 100644
--- a/envoy/config/filter/http/transcoder/v2/transcoder.proto
+++ b/envoy/config/filter/http/transcoder/v2/transcoder.proto
@@ -92,4 +92,26 @@ message GrpcJsonTranscoder {
   // binding for ``foo`` is not defined. Adding ``foo`` to ``ignored_query_parameters`` will allow
   // the same request to be mapped to ``GetShelf``.
   repeated string ignored_query_parameters = 6;
+
+  // Whether to route methods without the ``google.api.http`` option.
+  //
+  // Example :
+  //
+  // .. code-block:: proto
+  //
+  //     package bookstore;
+  //
+  //     service Bookstore {
+  //       rpc GetShelf(GetShelfRequest) returns (Shelf) {}
+  //     }
+  //
+  //     message GetShelfRequest {
+  //       int64 shelf = 1;
+  //     }
+  //
+  //     message Shelf {}
+  //
+  // The client could ``post`` a json body ``{"shelf": 1234}`` with the path of
+  // ``/bookstore.Bookstore/GetShelfRequest`` to call ``GetShelfRequest``.
+  bool auto_mapping = 7;
 }