Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input assume bytes #64

Merged
merged 1 commit into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions v2.9/backend/grpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
5 changes: 5 additions & 0 deletions v2.9/krakend.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down