I am running an application using Spring boot. I have dependencies for apache camel, open api and others.

I have defined a rest controller which exposes rest endpoints using the @RestController annotation as shown here. Rest Controller (Some text is hidden because it might expose personal information about me)

I have also exposed some REST endpoints with apache camel as shown here. Camel Router/RouteBuilder

Both of these work as expected on their own but the issue that I am having is that I am unable to document their endpoints successfully simultaneously. When I use the SpringDoc Camel dependency, all endpoints in the open api documentation are automatically prefixed with the "camel/" context path, however with the camel open_api dependency, no endpoints are prefixed with the "camel/" context path. The dependencies I am referring to are shown below: SpringDoc_Camel and OpenAPI_Camel dependencies

As an example, when using the springdoc_camel dependency. this is what happens when I try out an endpoint exposed by the camel router. This is working successfully as it has been prefixed with "camel/" for this specific endpoint which it should. Endpoint successfully documented

However when I attempt to try out an endpoint from my Rest Controller, it is automatically prefixing a "/camel/" to the endpoint as the context path, thus failing its execution since the rest controller endpoints don't have a context path and I don't want their documentation endpoints to be prefixed with a context path. Endpoint Documented Incorrectly

I want to correctly document both set of endpoints correctly (both camel rest endpoints and spring web endpoints.

I have tried changing the context path of camel as an empty string but that resulted in an error. I have edited the router (hence you will see a commented out section of code creating an empty string context path in the camel router). I have also tried changing the context path of both the camel router and the servlet (together and individually) in the application.properties file. application.properties file

I have attempted to look into ways I can edit the OpenAPI description manually but I did not find anything that could edit the endpoint paths.

0

There are 0 answers