OpenAPI Java
JVM since1.0.0 Native since1.0.0
Expose OpenAPI resources defined in Camel REST DSL
Maven coordinates
Or add the coordinates to your existing project:
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-openapi-java</artifactId>
</dependency> Check the User guide for more information about writing Camel Quarkus applications.
Usage
Swagger UI for development
This extension includes the Quarkus Swagger UI for development.
Providing you set a configuration property camel.rest.api-context-path in application.properties, Camel REST DSL endpoints will automatically become available within the Swagger UI so that you can interact with them.
If you choose to expose Quarkus OpenAPI specifications alongside those from Camel, you can register them with the Swagger UI with configuration quarkus.swagger-ui.urls."Quarkus"=/q/openapi.
Integration with Quarkus OpenAPI
By default, Camel REST service OpenAPI specifications are exposed under a separate HTTP endpoint to those generated by Quarkus OpenAPI.
You can enable Camel REST services to be exposed on the Quarkus OpenAPI endpoint with the following configuration.
quarkus.camel.openapi.expose.enabled=true When quarkus-smallrye-openapi is added to the application dependencies, the OpenAPI specification can be accessed from the following path /q/openapi?format=json.
Refer to the Quarkus OpenAPI guide for further information.
| It’s the users responsibility to use This feature does not support REST services defined by implementations of Usage of CDI injection within the RouteBuilder |
Additional Camel Quarkus configuration
| Configuration property | Type | Default |
|---|---|---|
When set to true, Camel REST DSL OpenAPI specifications are exposed under the Quarkus OpenAPI HTTP endpoint ( |
|
|
Configuration property fixed at build time. All other configuration properties are overridable at runtime.