You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Henrik Karlsson (Jira)" <ji...@apache.org> on 2021/12/03 14:58:00 UTC

[jira] [Updated] (CAMEL-17267) Query parameters not always set when calling api using rest-openapi

     [ https://issues.apache.org/jira/browse/CAMEL-17267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henrik Karlsson updated CAMEL-17267:
------------------------------------
    Component/s: camel-http

> Query parameters not always set when calling api using rest-openapi
> -------------------------------------------------------------------
>
>                 Key: CAMEL-17267
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17267
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http, camel-rest-openapi
>    Affects Versions: 3.13.0
>            Reporter: Henrik Karlsson
>            Priority: Major
>
> Then creating http endpoints for an openapi operation the http method is not set on the endpoint. If http methods not using the same query parameters only the query parameters from the last operation registered will be used.
> Example:
> The path /users has two operations GetUsers (GET) and CreateUser (POST). GetUsers has a query parameter 'search' and CreateUser has no query parameters. CreateUser is the last operation that's registered and therefore no query parameters is registered on that endpoint.
> Calling GetUsers (.to("api:GetUsers")) with the header 'search' set will result in a request without the search query parameter.
> By just adding httpMethod to the Endpoint Properties will solve this problem.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)