TYK Gateway - transform query parameters from camelCase to snake_case

260 views Asked by At

how to transform query parameters from camelCase to snake_case in TYK Gateway?

For example, https://gateway.com?firstName=John&lastName=Doe to https://upstream.com?first_name=John&last_name=Doe

1

There are 1 answers

0
Oluwaseye Ayinla On

I think you could achieve your goal with a custom plugin. There isn't an inbuilt middleware that allows you to transform the query parameters to your desired result.

The code for your plugin would be in the Request lifecycle and would take advantage of the request object. There are a few examples that can get you started on using custom plugins