Currently following interface method:

ResponseEntity<ModelSO> getSubscriptionInformation(
       @RequestBody @ApiParam(name = "request", value = "The body of the request", required = true) 
       ModelSO model, // body 1
       WebRequest webRequest); // body2 ?

can't be used as Feign Client:

java.lang.IllegalStateException: Method has too many Body parameters: public abstract org.springframework.http.ResponseEntity com.daimler.daivb.vts.snap.SubscriptionInformationSI.getSubscriptionInformation(java.lang.String,java.lang.String,java.lang.String,java.lang.String,com.daimler.daivb.vts.snap.SubscriptionRequestSO,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.springframework.web.context.request.WebRequest)
    at feign.Util.checkState(Util.java:128)
    at feign.Contract$BaseContract.parseAndValidateMetadata(Contract.java:114)
    at org.springframework.cloud.netflix.feign.support.SpringMvcContract.parseAndValidateMetadata(SpringMvcContract.java:131)
    at feign.Contract$BaseContract.parseAndValidatateMetadata(Contract.java:64)
    at feign.ReflectiveFeign$ParseHandlersByName.apply(ReflectiveFeign.java:146)
    at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:53)
    at feign.Feign$Builder.target(Feign.java:209)
    at feign.Feign$Builder.target(Feign.java:205)

Comment From: spencergibb

That's not how feign works. A client has no knowledge of what a web request is. You shouldn't be sharing server interfaces with clients.

Comment From: tjuchniewicz

But we share interfaces with clients...For us this is a common case. Any idea for improvement?

Comment From: tjuchniewicz

Current workaround is to use: @RequestParam(value = "ignored", required = false) WebRequest request

Comment From: ryanjbaxter

Reopening for the PR above

Comment From: spencergibb

@tjuchniewicz was going to rework and open against spring-cloud-openfeign

Comment From: jvstepanova84

The same problem with

    @ResponseBody
    @RequestMapping(method = RequestMethod.POST, value = "/status_bso",
            produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
    ResponseEntity<Response> statusBso(@RequestBody Request request, Errors errors);

where Error is org.springframework.validation.Errors

I can't use Feign with spring validation in controller, because I have error Method has too many Body parameters

Comment From: tjuchniewicz

Sorry but I don't work on this PR anymore :-(

Comment From: OlgaMaciaszek

@jvstepanova84 Have you tried using the workaround provided by @tjuchniewicz above?

Comment From: XhstormR

I have same problem here, we should provide ignore annotation like @FeignIgnore to programmatically ignore some method parameter.

Comment From: OlgaMaciaszek

@XhstormR Spring Cloud OpenFeign is now in maintenance only mode; we recommend migrating over to Spring Interface Clients as we do not plan further development there.