[
https://issues.apache.org/jira/browse/CAMEL-22065?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17951738#comment-17951738
]
Claus Ibsen commented on CAMEL-22065:
-------------------------------------
Okay I have a fix going to backport this
> camel-rest-openapi: OpenApi specification in the rest configuration will be
> ignored in Camel Spring Boot
> ---------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-22065
> URL: https://issues.apache.org/jira/browse/CAMEL-22065
> Project: Camel
> Issue Type: Bug
> Components: camel-rest-openapi, camel-spring-boot
> Affects Versions: 4.8.0, 4.10.0, 4.12.0
> Reporter: Marco Carletti
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.8.8, 4.10.5, 4.12.0
>
>
> Given the [Camel Example OpenAPI Contract
> First|https://github.com/apache/camel-spring-boot-examples/tree/main/openapi-contract-first]
> with the configuration
> {code:java}
> rest().openApi().specification("petstore.json").missingOperation("ignore");
> {code}
> and the consumer route
> {code:java}
> from("direct:getPetById")
> {code}
> we expect that the rest configuration will use the _petstore.json_ in the
> classpath to configure the exposed endpoints, but the application will not
> start using the command
> {code:bash}
> mvn spring-boot:run
> {code}
> due to
> {code:bash}
> ERROR 37424 --- [ main] o.s.boot.SpringApplication :
> Application run failed
> org.apache.camel.FailedToStartRouteException: Failed to start route route3
> because of The given OpenApi specification cannot be loaded from: openapi.json
> {code}
> so the application is looking for the _openapi.json_ file instead of the
> configured _petstore.json_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)