This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 3140cd81082ccea00b6eb5b8b7e5016e659d93a4 Author: Claus Ibsen <[email protected]> AuthorDate: Sat Nov 21 12:59:42 2026 +0100 Regen --- .../springboot/catalog/components/consul.json | 4 +-- .../springboot/catalog/dataformats/protobuf.json | 12 +++++---- .../camel-consul-starter/src/main/docs/consul.json | 2 +- .../springboot/ConsulComponentConfiguration.java | 6 ++++- .../src/main/docs/protobuf.json | 12 +++++++++ .../ProtobufDataFormatConfiguration.java | 30 ++++++++++++++++++++++ .../modules/ROOT/pages/starters/consul.adoc | 2 +- .../modules/ROOT/pages/starters/protobuf.adoc | 4 ++- tooling/camel-spring-boot-dependencies/pom.xml | 5 ++++ 9 files changed, 66 insertions(+), 11 deletions(-) diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/consul.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/consul.json index 2730ccc825f..bf7d3b76636 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/consul.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/consul.json @@ -25,7 +25,7 @@ }, "componentProperties": { "connectTimeout": { "index": 0, "kind": "property", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "duration", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout" }, - "key": { "index": 1, "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" }, + "key": { "index": 1, "kind": "property", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The key (kv) or event name (event) that the consumer watches or that the producer acts on; the other APIs do not use it. In a produc [...] "pingInstance": { "index": 2, "kind": "property", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" }, "readTimeout": { "index": 3, "kind": "property", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "duration", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout" }, "tags": { "index": 4, "kind": "property", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." }, @@ -92,7 +92,7 @@ "properties": { "apiEndpoint": { "index": 0, "kind": "path", "displayName": "Api Endpoint", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The API endpoint" }, "connectTimeout": { "index": 1, "kind": "parameter", "displayName": "Connect Timeout", "group": "common", "label": "", "required": false, "type": "duration", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Connect timeout" }, - "key": { "index": 2, "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The default key. Can be overridden by CamelConsulKey" }, + "key": { "index": 2, "kind": "parameter", "displayName": "Key", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "The key (kv) or event name (event) that the consumer watches or that the producer acts on; the other APIs do not use it. In a produ [...] "pingInstance": { "index": 3, "kind": "parameter", "displayName": "Ping Instance", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Configure if the AgentClient should attempt a ping before returning the Consul instance" }, "readTimeout": { "index": 4, "kind": "parameter", "displayName": "Read Timeout", "group": "common", "label": "", "required": false, "type": "duration", "javaType": "java.time.Duration", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Read timeout" }, "tags": { "index": 5, "kind": "parameter", "displayName": "Tags", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.consul.ConsulConfiguration", "configurationField": "configuration", "description": "Set tags. You can separate multiple tags by comma." }, diff --git a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/protobuf.json b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/protobuf.json index 1463df595c2..33cbedfd802 100644 --- a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/protobuf.json +++ b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/dataformats/protobuf.json @@ -16,15 +16,17 @@ "modelJavaType": "org.apache.camel.model.dataformat.ProtobufDataFormat" }, "bodyTypes": { - "marshalIn": { "carriers": [ "pojo", "map" ], "description": "A protobuf Message of a generated class, or a Map of the fields of the instanceClass message, which needs instanceClass. JSON text is not converted" }, + "marshalIn": { "carriers": [ "pojo", "map" ], "description": "A protobuf Message, such as a generated class or a DynamicMessage, or a Map of the fields of the message, which needs instanceClass or schema. JSON text is not converted" }, "marshalOut": { "carriers": [ "stream" ], "description": "The protobuf binary data, or JSON with contentTypeFormat json, in the stream cache, or a byte array when stream caching is off" }, - "unmarshalIn": { "carriers": [ "bytes", "stream", "file" ], "byOption": [ { "option": "contentTypeFormat", "value": "json", "carriers": [ "text", "bytes", "stream", "file" ] } ], "description": "Protobuf binary data, or JSON with contentTypeFormat json: unmarshal fails without instanceClass" }, - "unmarshalOut": { "carriers": [ "pojo" ], "javaType": "com.google.protobuf.Message", "javaTypeOption": "instanceClass", "description": "The generated class of instanceClass, such as AddressBookProtos$Person; convertBodyTo Map gives its fields" } + "unmarshalIn": { "carriers": [ "bytes", "stream", "file" ], "byOption": [ { "option": "contentTypeFormat", "value": "json", "carriers": [ "text", "bytes", "stream", "file" ] } ], "description": "Protobuf binary data, or JSON with contentTypeFormat json: unmarshal fails without instanceClass or schema" }, + "unmarshalOut": { "carriers": [ "pojo" ], "javaType": "com.google.protobuf.Message", "javaTypeOption": "instanceClass", "description": "The generated class of instanceClass, such as AddressBookProtos$Person, or a com.google.protobuf.DynamicMessage with schema; convertBodyTo Map gives its fields" } }, "properties": { "id": { "index": 0, "kind": "attribute", "displayName": "Id", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" }, "instanceClass": { "index": 1, "kind": "attribute", "displayName": "Instance Class", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of class to use when unmarshalling." }, - "contentTypeFormat": { "index": 2, "kind": "attribute", "displayName": "Content Type Format", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "native", "json" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "native", "description": "Defines a content type format in which protobuf message will be serialized\/deserialized from(to) the Java been. The format can either be native or json for either native protobu [...] - "contentTypeHeader": { "index": 3, "kind": "attribute", "displayName": "Content Type Header", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the data format should set the Content-Type header with the type from the data format. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalli [...] + "schema": { "index": 2, "kind": "attribute", "displayName": "Schema", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The protobuf schema, the text of a .proto file, used instead of instanceClass with the GoogleProtobuf library: messages are read into and written from a com.google.protobuf.DynamicMessage, so no class generated by protoc is needed. It may refer to a resour [...] + "messageName": { "index": 3, "kind": "attribute", "displayName": "Message Name", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The message type of the schema to use, such as Order, shop.Order or the nested Order.Line. By default the first message type of the schema." }, + "contentTypeFormat": { "index": 4, "kind": "attribute", "displayName": "Content Type Format", "group": "common", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "native", "json" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "native", "description": "Defines a content type format in which protobuf message will be serialized\/deserialized from(to) the Java been. The format can either be native or json for either native protobu [...] + "contentTypeHeader": { "index": 5, "kind": "attribute", "displayName": "Content Type Header", "group": "common", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether the data format should set the Content-Type header with the type from the data format. For example application\/xml for data formats marshalling to XML, or application\/json for data formats marshalli [...] } } diff --git a/components-starter/camel-consul-starter/src/main/docs/consul.json b/components-starter/camel-consul-starter/src/main/docs/consul.json index 2e3986e2894..0cdf66daed7 100644 --- a/components-starter/camel-consul-starter/src/main/docs/consul.json +++ b/components-starter/camel-consul-starter/src/main/docs/consul.json @@ -97,7 +97,7 @@ { "name": "camel.component.consul.key", "type": "java.lang.String", - "description": "The default key. Can be overridden by CamelConsulKey", + "description": "The key (kv) or event name (event) that the consumer watches or that the producer acts on; the other APIs do not use it. In a producer, a CamelConsulKey header overrides it, unless the header still holds the key that a consul consumer received (the CamelConsulReceivedKey exchange property).", "sourceType": "org.apache.camel.component.consul.springboot.ConsulComponentConfiguration" }, { diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java index d5a81d1fa5d..49ea138f7d9 100644 --- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java +++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/ConsulComponentConfiguration.java @@ -46,7 +46,11 @@ public class ConsulComponentConfiguration */ private Duration connectTimeout; /** - * The default key. Can be overridden by CamelConsulKey + * The key (kv) or event name (event) that the consumer watches or that the + * producer acts on; the other APIs do not use it. In a producer, a + * CamelConsulKey header overrides it, unless the header still holds the key + * that a consul consumer received (the CamelConsulReceivedKey exchange + * property). */ private String key; /** diff --git a/components-starter/camel-protobuf-starter/src/main/docs/protobuf.json b/components-starter/camel-protobuf-starter/src/main/docs/protobuf.json index 67036cd5064..c705bb0c921 100644 --- a/components-starter/camel-protobuf-starter/src/main/docs/protobuf.json +++ b/components-starter/camel-protobuf-starter/src/main/docs/protobuf.json @@ -43,6 +43,18 @@ "type": "java.lang.String", "description": "Name of class to use when unmarshalling.", "sourceType": "org.apache.camel.dataformat.protobuf.springboot.ProtobufDataFormatConfiguration" + }, + { + "name": "camel.dataformat.protobuf.message-name", + "type": "java.lang.String", + "description": "The message type of the schema to use, such as Order, shop.Order or the nested Order.Line. By default the first message type of the schema.", + "sourceType": "org.apache.camel.dataformat.protobuf.springboot.ProtobufDataFormatConfiguration" + }, + { + "name": "camel.dataformat.protobuf.schema", + "type": "java.lang.String", + "description": "The protobuf schema, the text of a .proto file, used instead of instanceClass with the GoogleProtobuf library: messages are read into and written from a com.google.protobuf.DynamicMessage, so no class generated by protoc is needed. It may refer to a resource, such as classpath:order.proto, file:order.proto or an http URL. This needs camel-protobuf-schema on the classpath.", + "sourceType": "org.apache.camel.dataformat.protobuf.springboot.ProtobufDataFormatConfiguration" } ], "hints": [], diff --git a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java index 142cf9bfa43..c376a66adde 100644 --- a/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java +++ b/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java @@ -38,6 +38,20 @@ public class ProtobufDataFormatConfiguration * Name of class to use when unmarshalling. */ private String instanceClass; + /** + * The protobuf schema, the text of a .proto file, used instead of + * instanceClass with the GoogleProtobuf library: messages are read into and + * written from a com.google.protobuf.DynamicMessage, so no class generated + * by protoc is needed. It may refer to a resource, such as + * classpath:order.proto, file:order.proto or an http URL. This needs + * camel-protobuf-schema on the classpath. + */ + private String schema; + /** + * The message type of the schema to use, such as Order, shop.Order or the + * nested Order.Line. By default the first message type of the schema. + */ + private String messageName; /** * Defines a content type format in which protobuf message will be * serialized/deserialized from(to) the Java been. The format can either be @@ -60,6 +74,22 @@ public class ProtobufDataFormatConfiguration this.instanceClass = instanceClass; } + public String getSchema() { + return schema; + } + + public void setSchema(String schema) { + this.schema = schema; + } + + public String getMessageName() { + return messageName; + } + + public void setMessageName(String messageName) { + this.messageName = messageName; + } + public String getContentTypeFormat() { return contentTypeFormat; } diff --git a/docs/spring-boot/modules/ROOT/pages/starters/consul.adoc b/docs/spring-boot/modules/ROOT/pages/starters/consul.adoc index fd2c123337e..d01dd1fe071 100644 --- a/docs/spring-boot/modules/ROOT/pages/starters/consul.adoc +++ b/docs/spring-boot/modules/ROOT/pages/starters/consul.adoc @@ -40,7 +40,7 @@ The starter supports 27 options, which are listed below. | camel.component.consul.datacenter | The data center | | String | camel.component.consul.enabled | Whether to enable auto configuration of the consul component. This is enabled by default. | | Boolean | camel.component.consul.first-index | The first index for watch for, default 0. The option is a java.math.BigInteger type. | | BigInteger -| camel.component.consul.key | The default key. Can be overridden by CamelConsulKey | | String +| camel.component.consul.key | The key (kv) or event name (event) that the consumer watches or that the producer acts on; the other APIs do not use it. In a producer, a CamelConsulKey header overrides it, unless the header still holds the key that a consul consumer received (the CamelConsulReceivedKey exchange property). | | String | camel.component.consul.lazy-start-producer | 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 [...] | camel.component.consul.near-node | The near node to use for queries. | | String | camel.component.consul.node-meta | The comma separated node meta-data to use for queries. | | String diff --git a/docs/spring-boot/modules/ROOT/pages/starters/protobuf.adoc b/docs/spring-boot/modules/ROOT/pages/starters/protobuf.adoc index 8c5aa7c6dc4..7eadd693eb0 100644 --- a/docs/spring-boot/modules/ROOT/pages/starters/protobuf.adoc +++ b/docs/spring-boot/modules/ROOT/pages/starters/protobuf.adoc @@ -23,7 +23,7 @@ Please refer to the above links for usage and configuration details. == Spring Boot Auto-Configuration -The starter supports 4 options, which are listed below. +The starter supports 6 options, which are listed below. [width="100%",cols="2,5,^1,2",options="header"] |=== @@ -32,4 +32,6 @@ The starter supports 4 options, which are listed below. | camel.dataformat.protobuf.content-type-header | Whether the data format should set the Content-Type header with the type from the data format. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON | true | Boolean | camel.dataformat.protobuf.enabled | Whether to enable auto configuration of the protobuf data format. This is enabled by default. | | Boolean | camel.dataformat.protobuf.instance-class | Name of class to use when unmarshalling. | | String +| camel.dataformat.protobuf.message-name | The message type of the schema to use, such as Order, shop.Order or the nested Order.Line. By default the first message type of the schema. | | String +| camel.dataformat.protobuf.schema | The protobuf schema, the text of a .proto file, used instead of instanceClass with the GoogleProtobuf library: messages are read into and written from a com.google.protobuf.DynamicMessage, so no class generated by protoc is needed. It may refer to a resource, such as classpath:order.proto, file:order.proto or an http URL. This needs camel-protobuf-schema on the classpath. | | String |=== diff --git a/tooling/camel-spring-boot-dependencies/pom.xml b/tooling/camel-spring-boot-dependencies/pom.xml index b53a9aad2bb..fa6d880af70 100644 --- a/tooling/camel-spring-boot-dependencies/pom.xml +++ b/tooling/camel-spring-boot-dependencies/pom.xml @@ -4649,6 +4649,11 @@ <artifactId>camel-protobuf</artifactId> <version>4.24.0-SNAPSHOT</version> </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-protobuf-schema</artifactId> + <version>4.24.0-SNAPSHOT</version> + </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-pubnub</artifactId>
