Chapter 58. OpenAPI Java


Expose OpenAPI resources defined in Camel REST DSL

58.1. What’s inside

Please refer to the above link for usage and configuration details.

58.2. Maven coordinates

Create a new project with this extension on code.quarkus.redhat.com

Or add the coordinates to your existing project:

<dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifactId>camel-quarkus-openapi-java</artifactId>
</dependency>
Copy to Clipboard Toggle word wrap

58.3. Usage

You can use this extension to expose REST DSL services to Quarkus OpenAPI. With quarkus-smallrye-openapi, you can access them by /q/openapi?format=json.

Refer to the Quarkus OpenAPI guide for further information.

This is an experimental feature. You can enable it by

quarkus.camel.openapi.expose.enabled=true
Copy to Clipboard Toggle word wrap
Warning

It’s the user’s responsibility to use @RegisterForReflection to register all model classes for reflection.

It doesn’t support the rest services used in org.apache.camel.builder.LambdaRouteBuilder right now. Also, it can not use CDI injection in the RouteBuilder configure() since we get the rest definitions at build time while CDI is unavailable.

58.4. Camel Quarkus limitations

The apiContextIdListing configuration option is not supported. Since multiple CamelContext`s are not supported and Quarkus applications run standalone, there is no scenario where attempting to resolve OpenApi specifications for a specific `CamelContext would be useful. It also introduces some additional overhead of requiring JMX (which is not supported in native mode) & additional Camel Quarkus extensions for processing XML.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat