You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/18 13:51:00 UTC
[jira] [Assigned] (CAMEL-25768) camel-jbang - camel run does not add camel-openapi-java for a code-first REST DSL with apiContextPath
[ https://issues.apache.org/jira/browse/CAMEL-25768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-25768:
-----------------------------------
Assignee: Claus Ibsen
> camel-jbang - camel run does not add camel-openapi-java for a code-first REST DSL with apiContextPath
> -----------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25768
> URL: https://issues.apache.org/jira/browse/CAMEL-25768
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> camel run adds camel-openapi-java when the REST DSL uses an OpenAPI contract (the rest-openapi component), but not for a code-first REST DSL with an API description:
> {code}
> - restConfiguration:
> bindingMode: json
> apiContextPath: openapi
> - rest:
> path: /orders
> get:
> - id: listOrders
> to:
> uri: direct:list-orders
> {code}
> The application does not start:
> {noformat}
> FailedToStartRouteException: Failed to start route: route1 because: java.lang.IllegalStateException: Cannot find RestApiProcessorFactory in Registry or classpath (such as the camel-openapi-java component)
> {noformat}
> DependencyDownloaderComponentResolver downloads camel-openapi-java only for rest-openapi. The API description of a code-first REST DSL is served through the rest-api component (route1 is rest-api://openapi). The same on 4.23.0 and 4.24.0-SNAPSHOT.
> Workaround: camel.jbang.dependencies=camel:openapi-java in application.properties.
> Fix: download camel-openapi-java when the rest-api component is resolved, as for rest-openapi.
> Found while writing the contracts/rest-code-first example (apache/camel-jbang-examples#118).
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)