Interface RestApiConsumerFactory
public interface RestApiConsumerFactory
SPI that creates the Camel
Consumer responsible for handling incoming HTTP GET requests to
the REST API documentation endpoint.
When a REST-DSL route includes an apiContextPath in its RestConfiguration, Camel uses this factory to
create a dedicated consumer that serves the in-memory OpenAPI specification generated from the route model. HTTP
components that support the REST DSL (such as camel-jetty, camel-netty-http, and
camel-platform-http) implement this interface alongside RestConsumerFactory. The factory is distinct
from RestOpenApiConsumerFactory, which handles full contract-first OpenAPI spec routing rather than just
serving the generated doc listing.
See Rest DSL in the Camel user manual.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreateApiConsumer(CamelContext camelContext, Processor processor, String contextPath, RestConfiguration configuration, Map<String, Object> parameters) Creates a new REST API Event Driven Consumer, which provides API listing of the REST services
-
Method Details
-
createApiConsumer
Consumer createApiConsumer(CamelContext camelContext, Processor processor, String contextPath, RestConfiguration configuration, Map<String, Object> parameters) throws ExceptionCreates a new REST API Event Driven Consumer, which provides API listing of the REST services- Parameters:
camelContext- the camel contextprocessor- the processorcontextPath- the context-pathconfiguration- REST configurationparameters- additional parameters- Returns:
- a newly created REST API consumer
- Throws:
Exception- can be thrown
-