Skip to content

Params order: "Body parameters cannot be used with form parameters." #561

@dle-fr

Description

@dle-fr

Hi,

This issue has already been discussed in #399.
I got the same error with Feign 8.18.0, on a Swagger-codegen generated client (so i cannot modify the client). The annotations used are the good ones (feign.param for path params).

Interface :

@RequestLine("POST /client/session/{sessionUid}/slot/{slot}/sign")
@Headers({"Content-Type: application/json","Accept: application/json",})
SignResponse sign(@Param(value="sessionUid", expander=ParamExpander.class) String sessionUid, @Param(value="slot", expander=ParamExpander.class) Integer slot, SignRequest body);

Error:

java.lang.IllegalStateException: Body parameters cannot be used with form parameters.

However, if I change params order (body in first or second place) manually in the generated code, it works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugUnexpected or incorrect behaviorhelp wantedIssues we need help with tackling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions