This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-24117 in repository https://gitbox.apache.org/repos/asf/camel.git
commit ee2340b4f73434106e3ac383dc26669a9b34a5ca Author: Claus Ibsen <[email protected]> AuthorDate: Thu Jul 16 12:28:59 2026 +0200 CAMEL-24117: camel-rest-openapi - Create per-endpoint strategy instance to fix shared state cross-talk Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../camel/component/rest/openapi/RestOpenApiComponent.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java index c6d391e2cd9b..14ae9850f47c 100644 --- a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java +++ b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiComponent.java @@ -178,7 +178,13 @@ public final class RestOpenApiComponent extends DefaultComponent implements SSLC } endpoint.setMissingOperation(getMissingOperation()); endpoint.setMockIncludePattern(getMockIncludePattern()); - endpoint.setRestOpenapiProcessorStrategy(getRestOpenapiProcessorStrategy()); + if (restOpenapiProcessorStrategy != null) { + endpoint.setRestOpenapiProcessorStrategy(restOpenapiProcessorStrategy); + } else { + DefaultRestOpenapiProcessorStrategy perEndpoint = new DefaultRestOpenapiProcessorStrategy(); + CamelContextAware.trySetCamelContext(perEndpoint, getCamelContext()); + endpoint.setRestOpenapiProcessorStrategy(perEndpoint); + } setProperties(endpoint, parameters); return endpoint; } @@ -196,10 +202,6 @@ public final class RestOpenApiComponent extends DefaultComponent implements SSLC } bindingPackageScan = base; } - if (restOpenapiProcessorStrategy == null) { - restOpenapiProcessorStrategy = new DefaultRestOpenapiProcessorStrategy(); - CamelContextAware.trySetCamelContext(restOpenapiProcessorStrategy, getCamelContext()); - } } public String getBasePath() {
