Update wiki Home page for rest-openapi

gitea_admin 2026-03-11 14:42:01 +00:00
parent 4b4818b9eb
commit 2ab97dd4a3

52
Home.md

@ -1,21 +1,45 @@
# Deploy the Project on CamelX Platform
# REST OpenApi
Deploy on CamelX Platform in three steps
To call REST services using OpenAPI specification as contract.
## Step 1: Create a release
From the project space, click on **"Create a release"**
## Metadata
The new version is automatically available in the list
| Property | Value |
|----------|-------|
| Scheme | `rest-openapi` |
| Support Level | Stable |
| Labels | rest,api |
| Version | 4.10.2 |
## Step 2: Deploy
Click on **"Deploy"**
## Maven Dependency
- **Version:** Select the desired release
- **Environment:** Choose `Development`, `Staging`, or `Production`
- **Configuration:** Select the configuration source
- **Resources:** Set CPU and Memory
```xml
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-rest-openapi</artifactId>
<version>4.10.2</version>
</dependency>
```
## Step 3: Expose
Enable **"Expose"**
## Endpoint Properties
Choose an **API Gateway** (Internal, Public, etc.)
| Name | Type | Required | Default | Description |
|------|------|----------|---------|-------------|
| `specificationUri` | string | | `openapi.json` | 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` | string | | | ID of the operation from the OpenApi specification. This is required when using producer |
| `apiContextPath` | string | | | Sets the context-path to use for servicing the OpenAPI specification |
| `clientRequestValidation` | boolean | | `false` | Whether to enable validation of the client request to check if the incoming request is valid according to the OpenAPI specification |
| `consumes` | string | | | 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` | string | | `fail` | Whether the consumer should fail,ignore or return a mock response for OpenAPI operations that are not mapped to a corresponding route. |
| `bridgeErrorHandler` | boolean | | `false` | 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` | string | | | 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` | object | | | 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` | object | | | Sets the exchange pattern when the consumer creates an exchange. |
| `mockIncludePattern` | string | | `classpath:camel-mock/**` | 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` | object | | | To use a custom strategy for how to process Rest DSL requests |
| `basePath` | string | | | API basePath, for example /v3. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration. |
| `host` | string | | | 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` | string | | | 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` | boolean | | `false` | Enable validation of requests against the configured OpenAPI specification |
| `componentName` | string | | | 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` | boolean | | `false` | 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. |