davsclaus opened a new pull request, #28100:
URL: https://github.com/apache/camel/pull/28100

   [CAMEL-25768](https://issues.apache.org/jira/browse/CAMEL-25768): a 
code-first REST DSL with an API description failed to start with `camel run`:
   
   ```yaml
   - restConfiguration:
       bindingMode: json
       apiContextPath: openapi
   ```
   
   ```
   FailedToStartRouteException: Failed to start route: route1 because: 
java.lang.IllegalStateException:
   Cannot find RestApiProcessorFactory in Registry or classpath (such as the 
camel-openapi-java component)
   ```
   
   The API description is served by the `rest-api` component, which needs 
camel-openapi-java. `DependencyDownloaderComponentResolver` downloaded 
camel-openapi-java only for the contract-first `rest-openapi`, so users had to 
add `camel.jbang.dependencies=camel:openapi-java`.
   
   ## What
   
   - The `rest-api` component downloads camel-openapi-java too.
   - The http producer stays a download of `rest-openapi` only.
   
   Found while writing the contracts/rest-code-first example 
(apache/camel-jbang-examples#118). In a benchmark of Oct 18-19 2026, the step 
that adds the API description to that example failed for local models.
   
   ## Tests
   
   - New `DependencyDownloaderComponentResolverTest`: it resolves a component 
with a recording downloader and checks the artifacts asked for.
     - `rest-api` asks for camel-openapi-java, and not camel-http.
     - `rest-openapi` asks for both.
     - Without the fix, the `rest-api` test fails.
   - All tests of camel-kamelet-main pass (58, 8 skipped).
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to