From 4d3db0596a99e34df143bdd6c8819a35f3e4de43 Mon Sep 17 00:00:00 2001 From: Albert Lombarte Date: Thu, 6 Feb 2025 12:06:40 +0100 Subject: [PATCH] Add input assume bytes --- v2.9/backend/grpc.json | 5 +++++ v2.9/krakend.json | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/v2.9/backend/grpc.json b/v2.9/backend/grpc.json index 918b3c2..90d988f 100644 --- a/v2.9/backend/grpc.json +++ b/v2.9/backend/grpc.json @@ -39,6 +39,11 @@ "$ref": "../timeunits.json#/$defs/timeunit", "type": "string" }, + "input_assume_bytes": { + "title": "Assume input are bytes", + "description": "When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid urlbase64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes. Standard base64 decoding is not attempted.", + "default": false + }, "input_mapping": { "title": "Mapping of parameters", "description": "A dictionary that converts query string parameters and parameters from `{placeholders}` into a different field during the backend request. When passing parameters using `{placeholder}` the parameter capitalizes the first letter, so you receive `Placeholder`.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/", diff --git a/v2.9/krakend.json b/v2.9/krakend.json index fd83520..65421c9 100644 --- a/v2.9/krakend.json +++ b/v2.9/krakend.json @@ -1871,6 +1871,11 @@ "$ref": "#/definitions/https%3A~1~1www.krakend.io~1schema~1v2.9~1timeunits.json/$defs/timeunit", "type": "string" }, + "input_assume_bytes": { + "title": "Assume input are bytes", + "description": "When set to true, when the backend has to fill a bytes field for a grpc protobuf payload to send, first tries to decode the input data (the one coming from either a json body field, a query param or header string) from base64: if it succeeds it fills the field to send with that binary / bytes data. If the incoming field is not a valid urlbase64 decoded field (the one used in jsonpb), it will fill the binary field with the verbatim conversion of the incoming string to bytes. Standard base64 decoding is not attempted.", + "default": false + }, "input_mapping": { "title": "Mapping of parameters", "description": "A dictionary that converts query string parameters and parameters from `{placeholders}` into a different field during the backend request. When passing parameters using `{placeholder}` the parameter capitalizes the first letter, so you receive `Placeholder`.\n\nSee: https://www.krakend.io/docs/enterprise/backends/grpc/",