Skip to content

Commit

Permalink
fix(rest): update cli flag names of array params
Browse files Browse the repository at this point in the history
  • Loading branch information
mirkolenz committed Oct 20, 2024
1 parent 0624ff8 commit 5b98dca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ grpc-proxy --proxy-port 50052 --backend-port 50051 --rest-proto-descriptor "./de
<!-- echo -e "\n```txt\n$(COLUMNS=80 go run . --help)\n```" >> README.md -->

```txt
Usage: grpc-proxy --backend-port=BACKEND-PORT,... --proxy-port=INT
Usage: grpc-proxy --backend-port=BACKEND-PORT,... --proxy-port=INT [flags]
Flags:
-h, --help Show context-sensitive help.
Expand Down Expand Up @@ -125,7 +125,7 @@ REST Gateway Options
--rest-proto-descriptor-bin=STRING
Supplies the binary content of the proto
descriptor set for the gRPC services.
--rest-service=REST-SERVICE,...
--rest-services=REST-SERVICES,...
A list of strings that supplies the
fully qualified service names (i.e.
“package_name.service_name”) that the
Expand Down Expand Up @@ -198,7 +198,7 @@ REST Gateway Options
parameters and do not know them beforehand.
Otherwise use ignored_query_parameters.
Defaults to false.
--rest-ignored-query-parameter=REST-IGNORED-QUERY-PARAMETER,...
--rest-ignored-query-parameters=REST-IGNORED-QUERY-PARAMETERS,...
A list of query parameters to be ignored
for transcoding method mapping. By default,
the transcoder filter will not transcode a
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ var cli struct {
Type string `hidden:"" json:"@type" default:"type.googleapis.com/envoy.extensions.filters.http.grpc_json_transcoder.v3.GrpcJsonTranscoder"`
ProtoDescriptor string `json:"proto_descriptor" xor:"proto_descriptor" type:"existingfile" help:"Supplies the filename of the proto descriptor set for the gRPC services."`
ProtoDescriptorBin string `json:"proto_descriptor_bin" xor:"proto_descriptor" help:"Supplies the binary content of the proto descriptor set for the gRPC services."`
Services []string `json:"services" name:"service" help:" A list of strings that supplies the fully qualified service names (i.e. “package_name.service_name”) that the transcoder will translate. If the service name doesn't exist in proto_descriptor, Envoy will fail at startup. The proto_descriptor may contain more services than the service names specified here, but they won’t be translated. By default, the filter will pass through requests that do not map to any specified services. If the list of services is empty, filter is considered disabled. However, this behavior changes if reject_unknown_method is enabled."`
Services []string `json:"services" help:" A list of strings that supplies the fully qualified service names (i.e. “package_name.service_name”) that the transcoder will translate. If the service name doesn't exist in proto_descriptor, Envoy will fail at startup. The proto_descriptor may contain more services than the service names specified here, but they won’t be translated. By default, the filter will pass through requests that do not map to any specified services. If the list of services is empty, filter is considered disabled. However, this behavior changes if reject_unknown_method is enabled."`
AutoMapping bool `json:"auto_mapping" default:"true" negatable:"" help:"Whether to route methods without the google.api.http option."`
ConvertGrpcStatus bool `json:"convert_grpc_status" help:"Whether to convert gRPC status headers to JSON. When trailer indicates a gRPC error and there was no HTTP body, take google.rpc.Status from the grpc-status-details-bin header and use it as JSON body. If there was no such header, make google.rpc.Status out of the grpc-status and grpc-message headers. The error details types must be present in the proto_descriptor."`
UrlUnescapeSpec string `json:"url_unescape_spec" default:"ALL_CHARACTERS_EXCEPT_RESERVED" enum:"ALL_CHARACTERS_EXCEPT_RESERVED,ALL_CHARACTERS_EXCEPT_SLASH,ALL_CHARACTERS" help:"URL unescaping policy. This spec is only applied when extracting variable with multiple segments in the URL path. For example, in case of /foo/{x=*}/bar/{y=prefix/*}/{z=**} x variable is single segment and y and z are multiple segments. For a path with /foo/first/bar/prefix/second/third/fourth, x=first, y=prefix/second, z=third/fourth. If this setting is not specified, the value defaults to ALL_CHARACTERS_EXCEPT_RESERVED."`
Expand All @@ -52,7 +52,7 @@ var cli struct {
MaxRequestBodySize uint32 `json:"max_request_body_size" default:"10000000" help:" The maximum size of a request body to be transcoded, in bytes. A body exceeding this size will provoke a HTTP 413 Request Entity Too Large response. Large values may cause envoy to use a lot of memory if there are many concurrent requests."`
MaxResponseBodySize uint32 `json:"max_response_body_size" default:"10000000" help:"The maximum size of a response body to be transcoded, in bytes. A body exceeding this size will provoke a HTTP 500 Internal Server Error response. Large values may cause envoy to use a lot of memory if there are many concurrent requests."`
IgnoreUnknownQueryParameters bool `json:"ignore_unknown_query_parameters" help:"Whether to ignore query parameters that cannot be mapped to a corresponding protobuf field. Use this if you cannot control the query parameters and do not know them beforehand. Otherwise use ignored_query_parameters. Defaults to false."`
IgnoredQueryParameters []string `json:"ignored_query_parameters" name:"ignored-query-parameter" help:"A list of query parameters to be ignored for transcoding method mapping. By default, the transcoder filter will not transcode a request if there are any unknown/invalid query parameters."`
IgnoredQueryParameters []string `json:"ignored_query_parameters" help:"A list of query parameters to be ignored for transcoding method mapping. By default, the transcoder filter will not transcode a request if there are any unknown/invalid query parameters."`
Print struct {
AddWhitespace bool `json:"add_whitespace" default:"true" negatable:"" help:"Whether to add spaces, line breaks and indentation to make the JSON output easy to read. Defaults to true."`
AlwaysPrintPrimitiveFields bool `json:"always_print_primitive_fields" help:"Whether to always print primitive fields. By default primitive fields with default values will be omitted in JSON output. For example, an int32 field set to 0 will be omitted. Setting this flag to true will override the default behavior and print primitive fields regardless of their values. Defaults to false."`
Expand Down

0 comments on commit 5b98dca

Please sign in to comment.