[
https://issues.apache.org/jira/browse/CAMEL-10036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-10036.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.17.2
Thanks for the code suggestion
> Dynamicaly Loaded XML Rests Bind to all RestConfigurations
> ----------------------------------------------------------
>
> Key: CAMEL-10036
> URL: https://issues.apache.org/jira/browse/CAMEL-10036
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Affects Versions: 2.17.1
> Reporter: Jay mann
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.17.2, 2.18.0
>
>
> When dynamically loading a Rests xml, you need to call:
> {code}
> xmlDef.asRouteDefinition(camelContext);
> {code}
> to created the routes, but it creates routes for every RestConfiguration in
> the camelContext. This can result in duplicate route errors.
> We should also be able to choose which RestConfiguration to bind to. Can we
> get the following Method added to org.camel.model.rest.RestDefinition:
> {code}
> public List<RouteDefinition> asRouteDefinition(CamelContext camelContext,
> RestConfiguration restConfig) {
> // sanity check this rest definition do not have duplicates
> validateUniquePaths();
> List<RouteDefinition> answer = new ArrayList<RouteDefinition>();
>
> addRouteDefinition(camelContext, answer, restConfig.getComponent());
>
> return answer;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)