Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-17267

Query parameters not always set when calling api using rest-openapi

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henka-rl Henrik Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: