This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 10744f887a20 CAMEL-24117: camel-rest-openapi - Create per-endpoint 
strategy instance (#24783)
10744f887a20 is described below

commit 10744f887a202781df277033002c8bbdbc4e709e
Author: Claus Ibsen <[email protected]>
AuthorDate: Thu Jul 16 15:39:57 2026 +0200

    CAMEL-24117: camel-rest-openapi - Create per-endpoint strategy instance 
(#24783)
    
    Co-Authored-By: Claude Opus 4.6 <[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 21922e53641a..b8d4212d69ad 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
@@ -179,7 +179,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;
     }
@@ -197,10 +203,6 @@ public final class RestOpenApiComponent extends 
DefaultComponent implements SSLC
             }
             bindingPackageScan = base;
         }
-        if (restOpenapiProcessorStrategy == null) {
-            restOpenapiProcessorStrategy = new 
DefaultRestOpenapiProcessorStrategy();
-            CamelContextAware.trySetCamelContext(restOpenapiProcessorStrategy, 
getCamelContext());
-        }
     }
 
     @Override

Reply via email to