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:54:00 UTC

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

Henrik Karlsson created CAMEL-17267:
---------------------------------------

             Summary: 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-rest-openapi
    Affects Versions: 3.13.0
            Reporter: Henrik Karlsson


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)