You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Saravanakumar Selvaraj (Jira)" <ji...@apache.org> on 2026/06/05 18:18:00 UTC
[jira] [Assigned] (CAMEL-23698) camel-rest-openapi - Producer appends trailing ? to URL when no query parameters are set
[ https://issues.apache.org/jira/browse/CAMEL-23698?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Saravanakumar Selvaraj reassigned CAMEL-23698:
----------------------------------------------
Assignee: Saravanakumar Selvaraj
> camel-rest-openapi - Producer appends trailing ? to URL when no query parameters are set
> ----------------------------------------------------------------------------------------
>
> Key: CAMEL-23698
> URL: https://issues.apache.org/jira/browse/CAMEL-23698
> Project: Camel
> Issue Type: Bug
> Components: camel-rest-openapi
> Reporter: Claus Ibsen
> Assignee: Saravanakumar Selvaraj
> Priority: Minor
>
> When a REST call is created from an OpenAPI spec via camel-rest-openapi, the producer sends a URL ending with an empty query part (?) even though no query parameters are set.
> *Example:*
> - API: GitHub GET /users/\{username\}/repos (with optional type query parameter)
> - Route: from("direct:listRepos").to("rest-openapi:github-api.json#listUserRepos");
> - Actual URL invoked: /users/myuser/repos?
> - Expected URL: /users/myuser/repos
> This can be a problem for services that treat /resource and /resource? differently.
> *Root cause:* {{URISupport.createURIWithQuery()}} in camel-util appends ? whenever the query string is non-null, even when it is empty. The fix is to also check {{!query.isEmpty()}} at line 446.
> *Reported against:* 4.18.2
> *Reporter:* Saravanakumar Selvaraj
--
This message was sent by Atlassian Jira
(v8.20.10#820010)