Hi zhangleispring & tttangzhen

Now, dubbo already registers parameter types to metadata.

like this :  java.lang.String ,java.lang.Integer ,

Should we  make changes in the registration metadata?  such as :
{"name":"java.lang.String", "age": "java.lang.Integer"}



ttttangzhen <[email protected]> 于2021年6月17日周四 下午2:48写道:

> for many rpc plugin ,parameter type order is needed.
> I think parameter order is also one of the content of parameter mapping
>
> > 2021年6月17日 下午2:28,XiaoYu <[email protected]> 写道:
> >
> > hi tttangzhen
> >
> > this is param order? maybe this plugin different parameters will be
> handled
> > depending on the rpc type.such as dubbo, http..
> >
> > ttttangzhen <[email protected]> 于2021年6月17日周四 下午12:21写道:
> >
> >> 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.
> >>
> >> I hope the parameter-mapping plugin can solve this problem.
> >> Users can config the parameter type list, {"name":"java.lang.String",
> >> "age": "java.lang.Integer"}
> >>
> >>> 2021年6月16日 下午10:01,张磊 <[email protected]> 写道:
> >>>
> >>> Hi everyone.
> >>> As of now,Shenyu has added lots plug-ins like request plugin and
> response
> >>> plugin.
> >>> I think we need some of the request body and response body modification
> >>> plugins.
> >>> 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"
> >>> }
> >>> of course the plug-in needs to support other capabilities like add
> >>> a parameter.
> >>>
> >>> If you have a good idea,please reply to this email and we can discuss
> it.
> >>> Thanks
> >>>
> >>> issue : https://github.com/dromara/shenyu/issues/1621
> >>
> >>
> >
>
>

Reply via email to