|
|
|
@ -8,28 +8,19 @@ import "validate/validate.proto"; |
|
|
|
|
// gRPC-JSON transcoder :ref:`configuration overview <config_http_filters_grpc_json_transcoder>`. |
|
|
|
|
|
|
|
|
|
message GrpcJsonTranscoder { |
|
|
|
|
// Supplies the binary protobuf descriptor set for the gRPC services. |
|
|
|
|
// The descriptor set has to include all of the types that are used in the services. Make sure |
|
|
|
|
// to use the ``--include_import`` option for ``protoc``. |
|
|
|
|
// |
|
|
|
|
// To generate a protobuf descriptor set for the gRPC service, you'll also need to clone the |
|
|
|
|
// googleapis repository from Github before running protoc, as you'll need annotations.proto |
|
|
|
|
// in your include path. |
|
|
|
|
// |
|
|
|
|
// .. code-block:: bash |
|
|
|
|
// |
|
|
|
|
// git clone https://github.com/googleapis/googleapis |
|
|
|
|
// GOOGLEAPIS_DIR=<your-local-googleapis-folder> |
|
|
|
|
// |
|
|
|
|
// Then run protoc to generate the descriptor set from bookstore.proto: |
|
|
|
|
// |
|
|
|
|
// .. code-block:: bash |
|
|
|
|
// |
|
|
|
|
// protoc -I$(GOOGLEAPIS_DIR) -I. --include_imports --include_source_info \ |
|
|
|
|
// --descriptor_set_out=proto.pb test/proto/bookstore.proto |
|
|
|
|
// |
|
|
|
|
// If you have more than one proto source files, you can pass all of them in one command. |
|
|
|
|
string proto_descriptor = 1 [(validate.rules).string.min_bytes = 1]; |
|
|
|
|
oneof descriptor_set { |
|
|
|
|
option (validate.required) = true; |
|
|
|
|
|
|
|
|
|
// Supplies the filename of |
|
|
|
|
// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC |
|
|
|
|
// services. |
|
|
|
|
string proto_descriptor = 1; |
|
|
|
|
|
|
|
|
|
// Supplies the binary content of |
|
|
|
|
// :ref:`the proto descriptor set <config_grpc_json_generate_proto_descriptor_set>` for the gRPC |
|
|
|
|
// services. |
|
|
|
|
bytes proto_descriptor_bin = 4; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// A list of strings that supplies the service names that the |
|
|
|
|
// transcoder will translate. If the service name doesn't exist in ``proto_descriptor``, Envoy |
|
|
|
|