You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library fails with methods that have both a @BeanParam and a body. For instance: ResultObject run(@BeanParam BeanObject bean, BodyObject body);
The current implementation relies on encoding the body as a bean parameter. So, the above method fails due to the JaxRsContract requiring a single body element.
First, there needs to be a Contract that handles @BeanParam as an http parameter. Second, I think the Contract needs to specify an indexToExpander. Third, I think the BeanParamTransformer's expand method needs to be implemented to be similar to the BeanParamEncoder (which seems to be used exclusively for body encoding).
The text was updated successfully, but these errors were encountered:
I changed this library to work for my use case. Specifically, I made a @BeanParam object parameter equivalent to a @QueryMap Map<String, Object> parameter.
Bump the feign version to 8.17.0, which contains a @QueryMap annotation
Fork the Contract.BaseContract so that it doesn't validate a @QueryMap as a Map
//if (data.queryMapIndex() != null) {
// checkState(Map.class.isAssignableFrom(parameterTypes[data.queryMapIndex()]),
// "QueryMap parameter must be a Map: %s", parameterTypes[data.queryMapIndex()]);
//}
Fork the JAXRSContract to extend the forked BaseContract, and to classify @BeanParam as a @QueryMap:
This library fails with methods that have both a
@BeanParam
and a body. For instance:ResultObject run(@BeanParam BeanObject bean, BodyObject body);
The current implementation relies on encoding the body as a bean parameter. So, the above method fails due to the JaxRsContract requiring a single body element.
First, there needs to be a Contract that handles
@BeanParam
as an http parameter. Second, I think the Contract needs to specify an indexToExpander. Third, I think the BeanParamTransformer's expand method needs to be implemented to be similar to the BeanParamEncoder (which seems to be used exclusively for body encoding).The text was updated successfully, but these errors were encountered: