Hello Camel crew,

I think there is a bug when using placeholder for route id in REST DSL route. I 
am using Camel 3.18.4, but same problem exists in previous versions as well.

I want my REST route to have my custom route id loaded from configuration by 
using configuration placeholder, like this:

rest()
                .post("{{endpoint.uri}}")                            <- loaded 
nice
                .id("{{endpoint.id}}")                                   <- NOT 
loaded
                .type(Claim.class)
                .consumes("application/json")
                .bindingMode(RestBindingMode.json)
                .to("direct:some_channel")

Endpoint uri placeholder will be loaded good, but placeholder for id will not 
be loaded and my route id will remain as "{{endpoint.id}}".

I think mistake and fix solution for this stands in class 
RouteDefinitionHelper, in method forceAssignIds():

If you check the provided image, I think that line 154 for resolving REST route 
id should have the same placeholder resolving logic as it is in line 142.

Should I create JIRA ticket for this or will you do it? It is probably better 
if you do it, but please provide us link of JIRA ticket in response so we can 
track the progress.

Thanks in advance!
Kind Regards,
Nikola Glidzic



Reply via email to