Add parameter-mapping plugin
for example: if you request body is a json like this:{ "name":"saber", "age":"18", "id":" 12345" } 1.you want to replace the key of parameters "name" to "realName",you can use the parameter-mapping plugin modify the json ,then the body json is{ "realName":"saber", "age":"18", "id":" 12345" } 2.if you want remove a key, you can use the parameter-mapping plugin modify the json like { "age":"18", "id":" 12345" }
assigned to me
hi, @SaberSola I have a suggestion. For many rpc plugins, the request parameters are in strict order. So we can provide a function to adjust the order of parameters. I added this feature to the dubbo plugin before, I think it can be integrated into your plan
HI,@ttttangzhen It’s good suggestion but the rpc call methods of Shenyu are all generalized. Is it necessary to strictly control the order of parameters?
Generic service declares strict parameter order.
For example, The parameter type list of an interface is (String name, Integer age).
Our request body mast use {"name" : "mike","age": 12}.
If we use {"age": 12, "name" : "mike"} or omit sending any parameters, It will throw an exception.
the parameter-mapping plugin can solve this problem.
Users can config the parameter type list, {"name":"java.lang.String", "age": "java.lang.Integer"}
@ttttangzhen Hi, pls discuss in [email protected]