-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
feat: As a user, I want to to use the body-transformer plugin for other data formats without warnings #10681
Comments
would you like to contribute this? |
Sorry for the late reply. I probably won't get time to work on this one myself. |
@shreemaan-abhishek feel good, I'd like to try it if needed ☺ |
@jesse-r-s-hines @shreemaan-abhishek
Or have a better idea |
Currently, if you do not specify The only problem is it spams warnings about "no input format to parse response body". I'd like an explicit In our case we also have an upstream service that sometimes returns incorrect So something like: Original response:
Config: "body-transformer": {
"response": {
"template": "{\"message\": \"{* string.gsub(_body, 'not ', '') *}\"}"
}
} Transformed response:
Thanks! |
@jesse-r-s-hines @shreemaan-abhishek |
Description
The body-transformer plugin is a very flexible plugin to modify the body content of requests and responses, and we can already use the
body-transformer
plugin to manipulate arbitrary data formats with the lua templates. However, if you don't specifyinput_format
andContent-Type
isn't JSON or XML it will always log a warning about "no input format to parse request/response body".Adding another format to the
input_format
enum,none
, that explicitly tellsbody-transformer
to not try to parse or validate the body content and silences this warning would be convenient.The text was updated successfully, but these errors were encountered: