Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
Unknown
Description
We should have some option to hook a function when the routes definition is created and/or instantiated something like:
context.addLifecycleStrategy(new LifecycleStrategySupport() { public void onRouteTemplateDefinitionAdd(RouteTemplateDefinition definition) { /* do some validation here */ } });
context.addRouteFromTemplate("myTemplate") .routeId("myRouteId") .parameter("a", "b") .handler(definition -> /* do some validation here */) .build()
That would help to add some validation in context such as camel-k when the route templates have some limitations.