rest-openapi/component.json

297 lines
13 KiB
JSON
Raw Permalink Normal View History

2026-03-11 14:32:46 +00:00
{
"component": {
"kind": "component",
"name": "rest-openapi",
"title": "REST OpenApi",
"description": "To call REST services using OpenAPI specification as contract.",
"deprecated": false,
"firstVersion": "3.1.0",
"label": "rest,api",
"javaType": "org.apache.camel.component.rest.openapi.RestOpenApiComponent",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
"artifactId": "camel-rest-openapi",
"version": "4.10.2",
"scheme": "rest-openapi",
"extendsScheme": "",
"syntax": "rest-openapi:specificationUri#operationId",
"async": false,
"api": false,
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": false,
"browsable": false,
"remote": true
},
"properties": {
"specificationUri": {
"index": 0,
"kind": "path",
"displayName": "Specification Uri",
"group": "common",
"label": "common",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": "openapi.json",
"description": "Path to the OpenApi specification file. The scheme, host base path are taken from this specification, but these can be overridden with properties on the component or endpoint level. If not given the component tries to load openapi.json resource from the classpath. Note that the host defined on the component and endpoint of this Component should contain the scheme, hostname and optionally the port in the URI syntax (i.e. http://api.example.com:8080). Overrides component configuration. The OpenApi specification can be loaded from different sources by prefixing with file: classpath: http: https:. Support for https is limited to using the JDK installed UrlHandler, and as such it can be cumbersome to setup TLS/SSL certificates for https (such as setting a number of javax.net.ssl JVM system properties). How to do that consult the JDK documentation for UrlHandler. Default value notice: By default loads openapi.json file"
},
"operationId": {
"index": 1,
"kind": "path",
"displayName": "Operation Id",
"group": "producer",
"label": "producer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "ID of the operation from the OpenApi specification. This is required when using producer"
},
"apiContextPath": {
"index": 2,
"kind": "parameter",
"displayName": "Api Context Path",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Sets the context-path to use for servicing the OpenAPI specification"
},
"clientRequestValidation": {
"index": 3,
"kind": "parameter",
"displayName": "Client Request Validation",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Whether to enable validation of the client request to check if the incoming request is valid according to the OpenAPI specification"
},
"consumes": {
"index": 4,
"kind": "parameter",
"displayName": "Consumes",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "What payload type this component capable of consuming. Could be one type, like application/json or multiple types as application/json, application/xml; q=0.5 according to the RFC7231. This equates or multiple types as application/json, application/xml; q=0.5 according to the RFC7231. This equates to the value of Accept HTTP header. If set overrides any value found in the OpenApi specification and. in the component configuration"
},
"missingOperation": {
"index": 5,
"kind": "parameter",
"displayName": "Missing Operation",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"enum": [
"fail",
"ignore",
"mock"
],
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": "fail",
"description": "Whether the consumer should fail,ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route."
},
"bridgeErrorHandler": {
"index": 6,
"kind": "parameter",
"displayName": "Bridge Error Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"consumerComponentName": {
"index": 7,
"kind": "parameter",
"displayName": "Consumer Component Name",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Name of the Camel component that will service the requests. The component must be present in Camel registry and it must implement RestOpenApiConsumerFactory service provider interface. If not set CLASSPATH is searched for single component that implements RestOpenApiConsumerFactory SPI. Overrides component configuration."
},
"exceptionHandler": {
"index": 8,
"kind": "parameter",
"displayName": "Exception Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.spi.ExceptionHandler",
"optionalPrefix": "consumer.",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"exchangePattern": {
"index": 9,
"kind": "parameter",
"displayName": "Exchange Pattern",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.ExchangePattern",
"enum": [
"InOnly",
"InOut"
],
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Sets the exchange pattern when the consumer creates an exchange."
},
"mockIncludePattern": {
"index": 10,
"kind": "parameter",
"displayName": "Mock Include Pattern",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": "classpath:camel-mock/**",
"description": "Used for inclusive filtering of mock data from directories. The pattern is using Ant-path style pattern. Multiple patterns can be specified separated by comma."
},
"restOpenapiProcessorStrategy": {
"index": 11,
"kind": "parameter",
"displayName": "Rest Openapi Processor Strategy",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.component.rest.openapi.RestOpenapiProcessorStrategy",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "To use a custom strategy for how to process Rest DSL requests"
},
"basePath": {
"index": 12,
"kind": "parameter",
"displayName": "Base Path",
"group": "producer",
"label": "producer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "API basePath, for example /v3. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration."
},
"host": {
"index": 13,
"kind": "parameter",
"displayName": "Host",
"group": "producer",
"label": "producer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Scheme hostname and port to direct the HTTP requests to in the form of https://hostname:port. Can be configured at the endpoint, component or in the corresponding REST configuration in the Camel Context. If you give this component a name (e.g. petstore) that REST configuration is consulted first, rest-openapi next, and global configuration last. If set overrides any value found in the OpenApi specification, RestConfiguration. Overrides all other configuration."
},
"produces": {
"index": 14,
"kind": "parameter",
"displayName": "Produces",
"group": "producer",
"label": "producer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "What payload type this component is producing. For example application/json according to the RFC7231. This equates to the value of Content-Type HTTP header. If set overrides any value present in the OpenApi specification. Overrides all other configuration."
},
"requestValidationEnabled": {
"index": 15,
"kind": "parameter",
"displayName": "Request Validation Enabled",
"group": "producer",
"label": "producer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Enable validation of requests against the configured OpenAPI specification"
},
"componentName": {
"index": 16,
"kind": "parameter",
"displayName": "Component Name",
"group": "producer (advanced)",
"label": "producer,advanced",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Name of the Camel component that will perform the requests. The component must be present in Camel registry and it must implement RestProducerFactory service provider interface. If not set CLASSPATH is searched for single component that implements RestProducerFactory SPI. Overrides component configuration."
},
"lazyStartProducer": {
"index": 17,
"kind": "parameter",
"displayName": "Lazy Start Producer",
"group": "producer (advanced)",
"label": "producer,advanced",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing."
}
}
}