@Configurer(bootstrap=true)
public class RestConfigurationProperties
extends org.apache.camel.spi.RestConfiguration
implements org.apache.camel.spi.BootstrapCloseable
| Constructor and Description |
|---|
RestConfigurationProperties(MainConfigurationProperties parent) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
MainConfigurationProperties |
end() |
RestConfigurationProperties |
withApiComponent(String apiComponent)
The name of the Camel component to use as the REST API (such as swagger)
|
RestConfigurationProperties |
withApiContextIdPattern(String apiContextIdPattern)
Deprecated.
|
RestConfigurationProperties |
withApiContextListing(boolean apiContextListing)
Deprecated.
|
RestConfigurationProperties |
withApiContextPath(String apiContextPath)
Sets a leading API context-path the REST API services will be using.
|
RestConfigurationProperties |
withApiContextRouteId(String apiContextRouteId)
Sets the route id to use for the route that services the REST API.
|
RestConfigurationProperties |
withApiHost(String apiHost)
To use a specific hostname for the API documentation (such as swagger or openapi)
This can be used to override the generated host with this configured hostname
|
RestConfigurationProperties |
withApiProperty(String key,
Object value)
Adds a api property
|
RestConfigurationProperties |
withApiVendorExtension(boolean apiVendorExtension)
Whether vendor extension is enabled in the Rest APIs.
|
RestConfigurationProperties |
withBindingMode(String bindingMode)
Sets the binding mode to use.
|
RestConfigurationProperties |
withClientRequestValidation(boolean clientRequestValidation)
Whether to enable validation of the client request to check:
1) Content-Type header matches what the Rest DSL consumes; returns HTTP Status 415 if validation error.
|
RestConfigurationProperties |
withComponent(String component)
The Camel Rest component to use for the REST transport (consumer), such as netty-http, jetty, servlet, undertow.
|
RestConfigurationProperties |
withComponentProperty(String key,
Object value)
Adds a component property
|
RestConfigurationProperties |
withConsumerProperty(String key,
Object value)
Adds a consumer property
|
RestConfigurationProperties |
withContextPath(String contextPath)
Sets a leading context-path the REST services will be using.
|
RestConfigurationProperties |
withCorsHeader(String key,
String value)
Adds a CORS header property
|
RestConfigurationProperties |
withDataFormatProperty(String key,
Object value)
Adds a data format property
|
RestConfigurationProperties |
withEnableCORS(boolean enableCORS)
Whether to enable CORS headers in the HTTP response.
|
RestConfigurationProperties |
withEndpointProperty(String key,
Object value)
Adds a endpoint property
|
RestConfigurationProperties |
withHost(String host)
The hostname to use for exposing the REST service.
|
RestConfigurationProperties |
withHostNameResolver(String hostNameResolver)
If no hostname has been explicit configured, then this resolver is used to compute the hostname the REST service
will be using.
|
RestConfigurationProperties |
withJsonDataFormat(String jsonDataFormat)
Name of specific json data format to use.
|
RestConfigurationProperties |
withPort(int port)
The port number to use for exposing the REST service.
|
RestConfigurationProperties |
withProducerApiDoc(String producerApiDoc)
Sets the location of the api document (swagger api) the REST producer will use to validate the REST uri and query
parameters are valid accordingly to the api document.
|
RestConfigurationProperties |
withProducerComponent(String producerComponent)
Sets the name of the Camel component to use as the REST producer
|
RestConfigurationProperties |
withScheme(String scheme)
The scheme to use for exposing the REST service.
|
RestConfigurationProperties |
withSkipBindingOnErrorCode(boolean skipBindingOnErrorCode)
Whether to skip binding on output if there is a custom HTTP error code header.
|
RestConfigurationProperties |
withUseXForwardHeaders(boolean useXForwardHeaders)
Whether to use X-Forward headers for Host and related setting.
|
RestConfigurationProperties |
withXmlDataFormat(String xmlDataFormat)
Name of specific XML data format to use.
|
getApiComponent, getApiContextIdPattern, getApiContextPath, getApiContextRouteId, getApiHost, getApiProperties, getBindingMode, getComponent, getComponentProperties, getConsumerProperties, getContextPath, getCorsHeaders, getDataFormatProperties, getEndpointProperties, getHost, getHostNameResolver, getJsonDataFormat, getPort, getProducerApiDoc, getProducerComponent, getScheme, getXmlDataFormat, isApiContextListing, isApiVendorExtension, isClientRequestValidation, isEnableCORS, isSkipBindingOnErrorCode, isUseXForwardHeaders, setApiComponent, setApiContextIdPattern, setApiContextListing, setApiContextPath, setApiContextRouteId, setApiHost, setApiProperties, setApiVendorExtension, setBindingMode, setBindingMode, setClientRequestValidation, setComponent, setComponentProperties, setConsumerProperties, setContextPath, setCorsHeaders, setDataFormatProperties, setEnableCORS, setEndpointProperties, setHost, setHostNameResolver, setHostNameResolver, setJsonDataFormat, setPort, setProducerApiDoc, setProducerComponent, setScheme, setSkipBindingOnErrorCode, setUseXForwardHeaders, setXmlDataFormatpublic RestConfigurationProperties(MainConfigurationProperties parent)
public MainConfigurationProperties end()
public void close()
close in interface Closeableclose in interface AutoCloseablepublic RestConfigurationProperties withComponent(String component)
public RestConfigurationProperties withApiComponent(String apiComponent)
public RestConfigurationProperties withProducerComponent(String producerComponent)
public RestConfigurationProperties withScheme(String scheme)
public RestConfigurationProperties withHost(String host)
public RestConfigurationProperties withApiHost(String apiHost)
public RestConfigurationProperties withUseXForwardHeaders(boolean useXForwardHeaders)
public RestConfigurationProperties withPort(int port)
public RestConfigurationProperties withProducerApiDoc(String producerApiDoc)
public RestConfigurationProperties withContextPath(String contextPath)
public RestConfigurationProperties withApiContextPath(String apiContextPath)
public RestConfigurationProperties withApiContextRouteId(String apiContextRouteId)
@Deprecated public RestConfigurationProperties withApiContextIdPattern(String apiContextIdPattern)
PatternHelper.matchPattern(String, String)@Deprecated public RestConfigurationProperties withApiContextListing(boolean apiContextListing)
public RestConfigurationProperties withApiVendorExtension(boolean apiVendorExtension)
public RestConfigurationProperties withHostNameResolver(String hostNameResolver)
public RestConfigurationProperties withBindingMode(String bindingMode)
public RestConfigurationProperties withSkipBindingOnErrorCode(boolean skipBindingOnErrorCode)
public RestConfigurationProperties withClientRequestValidation(boolean clientRequestValidation)
public RestConfigurationProperties withEnableCORS(boolean enableCORS)
public RestConfigurationProperties withJsonDataFormat(String jsonDataFormat)
public RestConfigurationProperties withXmlDataFormat(String xmlDataFormat)
public RestConfigurationProperties withComponentProperty(String key, Object value)
public RestConfigurationProperties withEndpointProperty(String key, Object value)
public RestConfigurationProperties withConsumerProperty(String key, Object value)
public RestConfigurationProperties withDataFormatProperty(String key, Object value)
public RestConfigurationProperties withApiProperty(String key, Object value)
public RestConfigurationProperties withCorsHeader(String key, String value)
Apache Camel