Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ Uses OpenAPI specifications to understand API endpoints, request/response format

Supports various HTTP operations (GET, POST, PUT, DELETE, etc.) as defined in the OpenAPI specification, providing comprehensive REST API integration capabilities.

=== Host and Base Path Configuration

The host and base path for the REST service can be configured to override the default values found in the OpenAPI specification. This is useful for production environments where the specification may contain default values like localhost:8080 that need to be replaced with the actual service endpoint.

=== Schema Validation

OpenAPI specifications include schema definitions that can be used for request and response validation, ensuring data integrity and API compliance.
OpenAPI specifications include schema definitions that can be used for request and response validation, ensuring data integrity and API compliance. Client request validation can be enabled to check if outgoing requests conform to the OpenAPI specification before they are sent.

=== Documentation-Driven Development

Expand Down
22 changes: 21 additions & 1 deletion kamelets/rest-openapi-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ spec:
title: Operation ID
description: The operation to call.
type: string
host:
title: Host
description: The host to use for calling the REST service. Overrides the value found in the OpenAPI specification. The format is https://hostname:port.
type: string
example: "https://api.example.com:443"
basePath:
title: Base Path
description: The API base path. Overrides the value present in the OpenAPI specification.
type: string
example: "/v3"
clientRequestValidation:
title: Client Request Validation
description: Whether to enable validation of the client request to check if the incoming request is valid according to the OpenAPI specification.
type: boolean
default: false
dependencies:
- "camel:rest-openapi"
- "camel:http"
Expand All @@ -55,4 +70,9 @@ spec:
from:
uri: kamelet:source
steps:
- to: "rest-openapi:{{specification}}#{{operation}}"
- to:
uri: "rest-openapi:{{specification}}#{{operation}}"
parameters:
host: "{{?host}}"
basePath: "{{?basePath}}"
clientRequestValidation: "{{clientRequestValidation}}"
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,21 @@ spec:
title: Operation ID
description: The operation to call.
type: string
host:
title: Host
description: The host to use for calling the REST service. Overrides the value found in the OpenAPI specification. The format is https://hostname:port.
type: string
example: "https://api.example.com:443"
basePath:
title: Base Path
description: The API base path. Overrides the value present in the OpenAPI specification.
type: string
example: "/v3"
clientRequestValidation:
title: Client Request Validation
description: Whether to enable validation of the client request to check if the incoming request is valid according to the OpenAPI specification.
type: boolean
default: false
dependencies:
- "camel:rest-openapi"
- "camel:http"
Expand All @@ -55,4 +70,9 @@ spec:
from:
uri: kamelet:source
steps:
- to: "rest-openapi:{{specification}}#{{operation}}"
- to:
uri: "rest-openapi:{{specification}}#{{operation}}"
parameters:
host: "{{?host}}"
basePath: "{{?basePath}}"
clientRequestValidation: "{{clientRequestValidation}}"
Loading