This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit e5c972aab914799907ed3482253f4fb81f91ce83 Author: nicolaferraro <ni.ferr...@gmail.com> AuthorDate: Fri May 14 13:43:48 2021 +0200 Regen catalog for new dataformats --- bom/camel-bom/pom.xml | 10 + .../apache/camel/catalog/dataformats.properties | 2 + .../camel/catalog/dataformats}/avro-jackson.json | 2 - .../org/apache/camel/catalog/dataformats/avro.json | 2 +- .../camel/catalog/dataformats/json-jackson.json | 2 + .../catalog/dataformats}/protobuf-jackson.json | 2 - .../org/apache/camel/catalog/docs.properties | 2 + .../catalog/docs/avro-jackson-dataformat.adoc | 22 +- .../catalog/docs/json-jackson-dataformat.adoc | 4 +- .../catalog/docs/protobuf-jackson-dataformat.adoc | 24 +- .../org/apache/camel/catalog/models/avro.json | 21 +- .../org/apache/camel/catalog/models/json.json | 2 + .../org/apache/camel/catalog/models/protobuf.json | 18 ++ .../apache/camel/catalog/schemas/camel-spring.xsd | 341 ++++++++++++++++++++- .../org/apache/camel/dataformat/avro/avro.json | 2 +- .../camel/dataformat/avro/AvroDataFormat.java | 5 + .../camel/component/jackson/avro/avro-jackson.json | 2 - ...ataformat.adoc => avro-jackson-dataformat.adoc} | 22 +- .../jackson/avro/JacksonAvroDataFormat.java | 2 +- .../jackson/protobuf/protobuf-jackson.json | 2 - ...ormat.adoc => protobuf-jackson-dataformat.adoc} | 24 +- .../protobuf/JacksonProtobufDataFormat.java | 2 +- .../jackson/JacksonDataFormatConfigurer.java | 4 + .../camel/component/jackson/json-jackson.json | 2 + .../src/main/docs/json-jackson-dataformat.adoc | 4 +- .../dataformat/protobuf/ProtobufDataFormat.java | 5 + .../org/apache/camel/main/components.properties | 50 +++ .../java/org/apache/camel/util/SensitiveUtils.java | 8 + docs/components/modules/dataformats/nav.adoc | 2 + .../dataformats/pages/avro-jackson-dataformat.adoc | 24 +- .../dataformats/pages/json-jackson-dataformat.adoc | 4 +- .../pages/protobuf-jackson-dataformat.adoc | 26 +- 32 files changed, 570 insertions(+), 74 deletions(-) diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index b29ba48..622f1be 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -984,6 +984,16 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-jackson-avro</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-jackson-protobuf</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-jacksonxml</artifactId> <version>${project.version}</version> </dependency> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties index 7c52bd4..29c3978 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats.properties @@ -1,6 +1,7 @@ any23 asn1 avro +avro-jackson barcode base64 beanio @@ -30,6 +31,7 @@ lzf mime-multipart pgp protobuf +protobuf-jackson rss secureXML soapjaxb diff --git a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro-jackson.json similarity index 92% copy from components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json copy to catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro-jackson.json index 65e5893..e2588ea 100644 --- a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro-jackson.json @@ -16,8 +16,6 @@ "modelJavaType": "org.apache.camel.model.dataformat.AvroDataFormat" }, "properties": { - "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, - "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "apache-avro", "jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ApacheAvro", "description": "Which Avro library to use." }, "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, "unmarshalTypeName": { "kind": "attribute", "displayName": "Unmarshal Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name of the java type to use when unmarshalling" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro.json index ba8b24f..72a26ab 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avro.json @@ -16,7 +16,7 @@ "modelJavaType": "org.apache.camel.model.dataformat.AvroDataFormat" }, "properties": { - "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, + "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/json-jackson.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/json-jackson.json index 7419478..d094b9c 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/json-jackson.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/json-jackson.json @@ -33,6 +33,8 @@ "timezone": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the Timezone when marshalling\/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream." }, "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" }, "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, + "schemaResolver": { "kind": "attribute", "displayName": "Schema Resolver", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." }, + "autoDiscoverSchemaResolver": { "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "When not disabled, the SchemaResolver will be looked up into the registry" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/protobuf-jackson.json similarity index 90% copy from components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json copy to catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/protobuf-jackson.json index 74e891d..a4d1e2e 100644 --- a/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/protobuf-jackson.json @@ -16,8 +16,6 @@ "modelJavaType": "org.apache.camel.model.dataformat.ProtobufDataFormat" }, "properties": { - "instanceClass": { "kind": "attribute", "displayName": "Instance Class", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of class to use when unmarshalling" }, - "contentTypeFormat": { "kind": "attribute", "displayName": "Content Type Format", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "json", "native" ], "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 protobuf or json fields representation [...] "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties index f3dcaac..32a5000 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs.properties @@ -22,6 +22,7 @@ atomix-value-component attachments avro-component avro-dataformat +avro-jackson-dataformat aws-secrets-manager-component aws-summary aws-xray @@ -383,6 +384,7 @@ process-eip process-manager properties-component protobuf-dataformat +protobuf-jackson-dataformat publish-subscribe-channel pubnub-component pulsar-component diff --git a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/avro-jackson-dataformat.adoc similarity index 94% copy from components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc copy to catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/avro-jackson-dataformat.adoc index dfb41f2..adfec7c 100644 --- a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/avro-jackson-dataformat.adoc @@ -1,10 +1,11 @@ -[[jackson-avro-dataformat]] -= Jackson Avro DataFormat -:docTitle: Jackson Avro +[[avro-jackson-dataformat]] += Avro DataFormat +:docTitle: Avro :artifactId: camel-jackson-avro -:description: Unmarshal Avro payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Avro and back using Jackson +:since: 2.14 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/avro-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +42,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Avro dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/json-jackson-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/json-jackson-dataformat.adoc index 81a7dd4..f1cbd02 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/json-jackson-dataformat.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/json-jackson-dataformat.adoc @@ -24,7 +24,7 @@ from("activemq:My.Queue"). // dataformat options: START -The JSON Jackson dataformat supports 17 options, which are listed below. +The JSON Jackson dataformat supports 19 options, which are listed below. @@ -48,6 +48,8 @@ The JSON Jackson dataformat supports 17 options, which are listed below. | timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream. | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/protobuf-jackson-dataformat.adoc similarity index 93% copy from components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc copy to catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/protobuf-jackson-dataformat.adoc index 6b79de6..d486c52 100644 --- a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/protobuf-jackson-dataformat.adoc @@ -1,10 +1,11 @@ -[[jackson-protobuf-dataformat]] -= Jackson Protobuf DataFormat -:docTitle: Jackson Protobuf +[[protobuf-jackson-dataformat]] += Protobuf DataFormat +:docTitle: Protobuf :artifactId: camel-jackson-protobuf -:description: Unmarshal Protobuf payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Protobuf and back using Jackson +:since: 2.2 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/protobuf-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +42,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Protobuf dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| contentTypeHeader | true | Boolean | 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 +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. -| contentTypeHeader | true | Boolean | 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 +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/avro.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/avro.json index e6effe1..41282e9 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/avro.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/avro.json @@ -12,7 +12,26 @@ "output": false }, "properties": { - "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, + "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, + "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "apache-avro", "jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ApacheAvro", "description": "Which Avro library to use." }, + "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, + "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, + "unmarshalTypeName": { "kind": "attribute", "displayName": "Unmarshal Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name of the java type to use when unmarshalling" }, + "jsonViewTypeName": { "kind": "attribute", "displayName": "Json View Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations" }, + "include": { "kind": "attribute", "displayName": "Include", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL" }, + "allowJmsType": { "kind": "attribute", "displayName": "Allow Jms Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to." }, + "collectionTypeName": { "kind": "attribute", "displayName": "Collection Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default." }, + "useList": { "kind": "attribute", "displayName": "Use List", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To unmarshal to a List of Map or a List of Pojo." }, + "moduleClassNames": { "kind": "attribute", "displayName": "Module Class Names", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma." }, + "moduleRefs": { "kind": "attribute", "displayName": "Module Refs", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma." }, + "enableFeatures": { "kind": "attribute", "displayName": "Enable Features", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jack [...] + "disableFeatures": { "kind": "attribute", "displayName": "Disable Features", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.j [...] + "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used." }, + "timezone": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the Timezone when marshalling\/unmarshalling." }, + "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" }, + "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, + "schemaResolver": { "kind": "attribute", "displayName": "Schema Resolver", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." }, + "autoDiscoverSchemaResolver": { "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "When not disabled, the SchemaResolver will be looked up into the registry" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/json.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/json.json index f32d4c2..af46168 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/json.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/json.json @@ -31,6 +31,8 @@ "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" }, "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether XStream will drop the root node in the generated JSon. You may want to enable this when using POJOs; as then the written object will include the class name as root node, which is often not intended to be written in the JSON output." }, "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, + "schemaResolver": { "kind": "attribute", "displayName": "Schema Resolver", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." }, + "autoDiscoverSchemaResolver": { "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "When not disabled, the SchemaResolver will be looked up into the registry" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/protobuf.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/protobuf.json index eefeaf1..24236f3 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/protobuf.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/models/protobuf.json @@ -15,6 +15,24 @@ "instanceClass": { "kind": "attribute", "displayName": "Instance Class", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of class to use when unmarshalling" }, "contentTypeFormat": { "kind": "attribute", "displayName": "Content Type Format", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "json", "native" ], "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 protobuf or json fields representation [...] "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, + "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.ProtobufLibrary", "enum": [ "google-protobuf", "jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "GoogleProtobuf", "description": "Which Protobuf library to use." }, + "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, + "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, + "unmarshalTypeName": { "kind": "attribute", "displayName": "Unmarshal Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name of the java type to use when unmarshalling" }, + "jsonViewTypeName": { "kind": "attribute", "displayName": "Json View Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations" }, + "include": { "kind": "attribute", "displayName": "Include", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL" }, + "allowJmsType": { "kind": "attribute", "displayName": "Allow Jms Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to." }, + "collectionTypeName": { "kind": "attribute", "displayName": "Collection Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default." }, + "useList": { "kind": "attribute", "displayName": "Use List", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To unmarshal to a List of Map or a List of Pojo." }, + "moduleClassNames": { "kind": "attribute", "displayName": "Module Class Names", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma." }, + "moduleRefs": { "kind": "attribute", "displayName": "Module Refs", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma." }, + "enableFeatures": { "kind": "attribute", "displayName": "Enable Features", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jack [...] + "disableFeatures": { "kind": "attribute", "displayName": "Disable Features", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.j [...] + "allowUnmarshallType": { "kind": "attribute", "displayName": "Allow Unmarshall Type", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used." }, + "timezone": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the Timezone when marshalling\/unmarshalling." }, + "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" }, + "schemaResolver": { "kind": "attribute", "displayName": "Schema Resolver", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." }, + "autoDiscoverSchemaResolver": { "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "When not disabled, the SchemaResolver will be looked up into the registry" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index ec4d05f..a87c100 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -5942,13 +5942,173 @@ Name of class to use when unmarshalling. <xs:complexContent> <xs:extension base="tns:dataFormat"> <xs:sequence/> - <xs:attribute name="instanceClassName" type="xs:string" use="required"> + <xs:attribute name="instanceClassName" type="xs:string"> <xs:annotation> <xs:documentation xml:lang="en"><![CDATA[ Class name to use for marshal and unmarshalling. ]]></xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="library" type="tns:avroLibrary"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Which Avro library to use. Default value: ApacheAvro + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="objectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Lookup and use the existing ObjectMapper with the given id when using Jackson. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useDefaultObjectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Whether to lookup and use default Jackson ObjectMapper from the registry. +Default value: true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="unmarshalTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Class name of the java type to use when unmarshalling. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="jsonViewTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +When marshalling a POJO to JSON you might want to exclude certain fields from +the JSON output. With Jackson you can use JSON views to accomplish this. This +option is to refer to the class which has JsonView annotations. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="include" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If you want to marshal a pojo to JSON, and the pojo has some fields with null +values. And you want to skip these null values, you can set this option to +NON_NULL. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="allowJmsType" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Used for JMS users to allow the JMSType header from the JMS spec to specify a +FQN classname to use to unmarshal to. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="collectionTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Refers to a custom collection type to lookup in the registry to use. This option +should rarely be used, but allows to use different collection types than +java.util.Collection based as default. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useList" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To unmarshal to a List of Map or a List of Pojo. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="moduleClassNames" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as +a String with FQN class names. Multiple classes can be separated by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="moduleRefs" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To use custom Jackson modules referred from the Camel registry. Multiple modules +can be separated by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="enableFeatures" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Set of features to enable on the Jackson +com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that +matches a enum from com.fasterxml.jackson.databind.SerializationFeature, +com.fasterxml.jackson.databind.DeserializationFeature, or +com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated +by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="disableFeatures" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Set of features to disable on the Jackson +com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that +matches a enum from com.fasterxml.jackson.databind.SerializationFeature, +com.fasterxml.jackson.databind.DeserializationFeature, or +com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated +by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="allowUnmarshallType" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If enabled then Jackson is allowed to attempt to use the +CamelJacksonUnmarshalType header during the unmarshalling. This should only be +enabled when desired to be used. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="timezone" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If set then Jackson will use the Timezone when marshalling/unmarshalling. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="autoDiscoverObjectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If set to true then Jackson will lookup for an objectMapper into the registry. +Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="contentTypeHeader" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +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. Default value: +true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="schemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Optional schema resolver used to lookup schemas for the data in transit. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="autoDiscoverSchemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +When not disabled, the SchemaResolver will be looked up into the registry. +Default value: true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> @@ -7352,6 +7512,21 @@ true ]]></xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="schemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Optional schema resolver used to lookup schemas for the data in transit. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="autoDiscoverSchemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +When not disabled, the SchemaResolver will be looked up into the registry. +Default value: true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> @@ -7476,6 +7651,156 @@ true ]]></xs:documentation> </xs:annotation> </xs:attribute> + <xs:attribute name="library" type="tns:protobufLibrary"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Which Protobuf library to use. Default value: GoogleProtobuf + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="objectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Lookup and use the existing ObjectMapper with the given id when using Jackson. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useDefaultObjectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Whether to lookup and use default Jackson ObjectMapper from the registry. +Default value: true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="unmarshalTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Class name of the java type to use when unmarshalling. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="jsonViewTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +When marshalling a POJO to JSON you might want to exclude certain fields from +the JSON output. With Jackson you can use JSON views to accomplish this. This +option is to refer to the class which has JsonView annotations. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="include" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If you want to marshal a pojo to JSON, and the pojo has some fields with null +values. And you want to skip these null values, you can set this option to +NON_NULL. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="allowJmsType" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Used for JMS users to allow the JMSType header from the JMS spec to specify a +FQN classname to use to unmarshal to. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="collectionTypeName" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Refers to a custom collection type to lookup in the registry to use. This option +should rarely be used, but allows to use different collection types than +java.util.Collection based as default. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="useList" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To unmarshal to a List of Map or a List of Pojo. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="moduleClassNames" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as +a String with FQN class names. Multiple classes can be separated by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="moduleRefs" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +To use custom Jackson modules referred from the Camel registry. Multiple modules +can be separated by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="enableFeatures" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Set of features to enable on the Jackson +com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that +matches a enum from com.fasterxml.jackson.databind.SerializationFeature, +com.fasterxml.jackson.databind.DeserializationFeature, or +com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated +by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="disableFeatures" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Set of features to disable on the Jackson +com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that +matches a enum from com.fasterxml.jackson.databind.SerializationFeature, +com.fasterxml.jackson.databind.DeserializationFeature, or +com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated +by comma. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="allowUnmarshallType" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If enabled then Jackson is allowed to attempt to use the +CamelJacksonUnmarshalType header during the unmarshalling. This should only be +enabled when desired to be used. Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="timezone" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If set then Jackson will use the Timezone when marshalling/unmarshalling. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="autoDiscoverObjectMapper" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +If set to true then Jackson will lookup for an objectMapper into the registry. +Default value: false + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="schemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +Optional schema resolver used to lookup schemas for the data in transit. + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="autoDiscoverSchemaResolver" type="xs:string"> + <xs:annotation> + <xs:documentation xml:lang="en"><![CDATA[ +When not disabled, the SchemaResolver will be looked up into the registry. +Default value: true + ]]></xs:documentation> + </xs:annotation> + </xs:attribute> </xs:extension> </xs:complexContent> </xs:complexType> @@ -15314,6 +15639,13 @@ multiple certificates. </xs:restriction> </xs:simpleType> + <xs:simpleType name="avroLibrary"> + <xs:restriction base="xs:string"> + <xs:enumeration value="ApacheAvro"/> + <xs:enumeration value="Jackson"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="jsonLibrary"> <xs:restriction base="xs:string"> <xs:enumeration value="XStream"/> @@ -15325,6 +15657,13 @@ multiple certificates. </xs:restriction> </xs:simpleType> + <xs:simpleType name="protobufLibrary"> + <xs:restriction base="xs:string"> + <xs:enumeration value="GoogleProtobuf"/> + <xs:enumeration value="Jackson"/> + </xs:restriction> + </xs:simpleType> + <xs:simpleType name="yamlLibrary"> <xs:restriction base="xs:string"> <xs:enumeration value="SnakeYAML"/> diff --git a/components/camel-avro/src/generated/resources/org/apache/camel/dataformat/avro/avro.json b/components/camel-avro/src/generated/resources/org/apache/camel/dataformat/avro/avro.json index ba8b24f..72a26ab 100644 --- a/components/camel-avro/src/generated/resources/org/apache/camel/dataformat/avro/avro.json +++ b/components/camel-avro/src/generated/resources/org/apache/camel/dataformat/avro/avro.json @@ -16,7 +16,7 @@ "modelJavaType": "org.apache.camel.model.dataformat.AvroDataFormat" }, "properties": { - "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, + "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java index 1f1bde3..4ceea69 100644 --- a/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java +++ b/components/camel-avro/src/main/java/org/apache/camel/dataformat/avro/AvroDataFormat.java @@ -38,11 +38,16 @@ import org.apache.camel.CamelException; import org.apache.camel.Exchange; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatName; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Dataformat; import org.apache.camel.support.service.ServiceSupport; import org.apache.camel.util.ObjectHelper; @Dataformat("avro") +@Metadata(excludeProperties = "library,objectMapper,useDefaultObjectMapper,jsonViewTypeName,jsonView,include,allowJmsType," + + "collectionTypeName,collectionType,useList,moduleClassNames,moduleRefs,enableFeatures," + + "disableFeatures,allowUnmarshallType,timezone,autoDiscoverObjectMapper," + + "contentTypeHeader,schemaResolver,autoDiscoverSchemaResolver,unmarshalTypeName") public class AvroDataFormat extends ServiceSupport implements DataFormat, DataFormatName, CamelContextAware { private static final String GENERIC_CONTAINER_CLASSNAME = GenericContainer.class.getName(); diff --git a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json b/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json index 65e5893..e2588ea 100644 --- a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json +++ b/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avro-jackson.json @@ -16,8 +16,6 @@ "modelJavaType": "org.apache.camel.model.dataformat.AvroDataFormat" }, "properties": { - "instanceClassName": { "kind": "attribute", "displayName": "Instance Class Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name to use for marshal and unmarshalling" }, - "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "apache-avro", "jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ApacheAvro", "description": "Which Avro library to use." }, "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, "unmarshalTypeName": { "kind": "attribute", "displayName": "Unmarshal Type Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Class name of the java type to use when unmarshalling" }, diff --git a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc b/components/camel-jackson-avro/src/main/docs/avro-jackson-dataformat.adoc similarity index 94% copy from components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc copy to components/camel-jackson-avro/src/main/docs/avro-jackson-dataformat.adoc index dfb41f2..adfec7c 100644 --- a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc +++ b/components/camel-jackson-avro/src/main/docs/avro-jackson-dataformat.adoc @@ -1,10 +1,11 @@ -[[jackson-avro-dataformat]] -= Jackson Avro DataFormat -:docTitle: Jackson Avro +[[avro-jackson-dataformat]] += Avro DataFormat +:docTitle: Avro :artifactId: camel-jackson-avro -:description: Unmarshal Avro payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Avro and back using Jackson +:since: 2.14 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/avro-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +42,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Avro dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/components/camel-jackson-avro/src/main/java/org/apache/camel/component/jackson/avro/JacksonAvroDataFormat.java b/components/camel-jackson-avro/src/main/java/org/apache/camel/component/jackson/avro/JacksonAvroDataFormat.java index 25bbede..a12323e 100644 --- a/components/camel-jackson-avro/src/main/java/org/apache/camel/component/jackson/avro/JacksonAvroDataFormat.java +++ b/components/camel-jackson-avro/src/main/java/org/apache/camel/component/jackson/avro/JacksonAvroDataFormat.java @@ -26,7 +26,7 @@ import org.apache.camel.spi.annotations.Dataformat; * Marshal POJOs to Avro and back using <a href="http://jackson.codehaus.org/">Jackson</a> */ @Dataformat("avro-jackson") -@Metadata(firstVersion = "3.10.0", excludeProperties = "schema") +@Metadata(firstVersion = "3.10.0", excludeProperties = "library,instanceClassName,schema") public class JacksonAvroDataFormat extends AbstractJacksonDataFormat { /** diff --git a/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json b/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json index 74e891d..a4d1e2e 100644 --- a/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json +++ b/components/camel-jackson-protobuf/src/generated/resources/org/apache/camel/component/jackson/protobuf/protobuf-jackson.json @@ -16,8 +16,6 @@ "modelJavaType": "org.apache.camel.model.dataformat.ProtobufDataFormat" }, "properties": { - "instanceClass": { "kind": "attribute", "displayName": "Instance Class", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of class to use when unmarshalling" }, - "contentTypeFormat": { "kind": "attribute", "displayName": "Content Type Format", "required": false, "type": "enum", "javaType": "java.lang.String", "enum": [ "json", "native" ], "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 protobuf or json fields representation [...] "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, "objectMapper": { "kind": "attribute", "displayName": "Object Mapper", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Lookup and use the existing ObjectMapper with the given id when using Jackson." }, "useDefaultObjectMapper": { "kind": "attribute", "displayName": "Use Default Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether to lookup and use default Jackson ObjectMapper from the registry." }, diff --git a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc b/components/camel-jackson-protobuf/src/main/docs/protobuf-jackson-dataformat.adoc similarity index 93% copy from components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc copy to components/camel-jackson-protobuf/src/main/docs/protobuf-jackson-dataformat.adoc index 6b79de6..d486c52 100644 --- a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc +++ b/components/camel-jackson-protobuf/src/main/docs/protobuf-jackson-dataformat.adoc @@ -1,10 +1,11 @@ -[[jackson-protobuf-dataformat]] -= Jackson Protobuf DataFormat -:docTitle: Jackson Protobuf +[[protobuf-jackson-dataformat]] += Protobuf DataFormat +:docTitle: Protobuf :artifactId: camel-jackson-protobuf -:description: Unmarshal Protobuf payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Protobuf and back using Jackson +:since: 2.2 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/protobuf-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +42,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Protobuf dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| contentTypeHeader | true | Boolean | 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 +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. -| contentTypeHeader | true | Boolean | 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 +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/components/camel-jackson-protobuf/src/main/java/org/apache/camel/component/jackson/protobuf/JacksonProtobufDataFormat.java b/components/camel-jackson-protobuf/src/main/java/org/apache/camel/component/jackson/protobuf/JacksonProtobufDataFormat.java index 6c80f8d..7c8b046 100644 --- a/components/camel-jackson-protobuf/src/main/java/org/apache/camel/component/jackson/protobuf/JacksonProtobufDataFormat.java +++ b/components/camel-jackson-protobuf/src/main/java/org/apache/camel/component/jackson/protobuf/JacksonProtobufDataFormat.java @@ -26,7 +26,7 @@ import org.apache.camel.spi.annotations.Dataformat; * Marshal POJOs to Protobuf and back using <a href="http://jackson.codehaus.org/">Jackson</a> */ @Dataformat("protobuf-jackson") -@Metadata(firstVersion = "3.10.0", excludeProperties = "contentTypeFormat,defaultInstance") +@Metadata(firstVersion = "3.10.0", excludeProperties = "library,instanceClass,contentTypeFormat,defaultInstance") public class JacksonProtobufDataFormat extends AbstractJacksonDataFormat { /** diff --git a/components/camel-jackson/src/generated/java/org/apache/camel/component/jackson/JacksonDataFormatConfigurer.java b/components/camel-jackson/src/generated/java/org/apache/camel/component/jackson/JacksonDataFormatConfigurer.java index aff952f..0ee2615 100644 --- a/components/camel-jackson/src/generated/java/org/apache/camel/component/jackson/JacksonDataFormatConfigurer.java +++ b/components/camel-jackson/src/generated/java/org/apache/camel/component/jackson/JacksonDataFormatConfigurer.java @@ -50,6 +50,10 @@ public class JacksonDataFormatConfigurer extends PropertyConfigurerSupport imple case "timezone": dataformat.setTimezone(property(camelContext, java.util.TimeZone.class, value)); return true; case "autodiscoverobjectmapper": case "autoDiscoverObjectMapper": dataformat.setAutoDiscoverObjectMapper(property(camelContext, boolean.class, value)); return true; + case "schemaresolver": + case "schemaResolver": dataformat.setSchemaResolver(property(camelContext, org.apache.camel.component.jackson.SchemaResolver.class, value)); return true; + case "autodiscoverschemaresolver": + case "autoDiscoverSchemaResolver": dataformat.setAutoDiscoverSchemaResolver(property(camelContext, boolean.class, value)); return true; default: return false; } } diff --git a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json index 7419478..d094b9c 100644 --- a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json +++ b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/json-jackson.json @@ -33,6 +33,8 @@ "timezone": { "kind": "attribute", "displayName": "Timezone", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the Timezone when marshalling\/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream." }, "autoDiscoverObjectMapper": { "kind": "attribute", "displayName": "Auto Discover Object Mapper", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If set to true then Jackson will lookup for an objectMapper into the registry" }, "contentTypeHeader": { "kind": "attribute", "displayName": "Content Type Header", "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 marshalling to JSON" }, + "schemaResolver": { "kind": "attribute", "displayName": "Schema Resolver", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." }, + "autoDiscoverSchemaResolver": { "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "When not disabled, the SchemaResolver will be looked up into the registry" }, "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" } } } diff --git a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc index 81a7dd4..f1cbd02 100644 --- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc +++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc @@ -24,7 +24,7 @@ from("activemq:My.Queue"). // dataformat options: START -The JSON Jackson dataformat supports 17 options, which are listed below. +The JSON Jackson dataformat supports 19 options, which are listed below. @@ -48,6 +48,8 @@ The JSON Jackson dataformat supports 17 options, which are listed below. | timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream. | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java index 20127bf..1c0b137 100644 --- a/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java +++ b/components/camel-protobuf/src/main/java/org/apache/camel/dataformat/protobuf/ProtobufDataFormat.java @@ -34,6 +34,7 @@ import org.apache.camel.NoTypeConversionAvailableException; import org.apache.camel.spi.DataFormat; import org.apache.camel.spi.DataFormatContentTypeHeader; import org.apache.camel.spi.DataFormatName; +import org.apache.camel.spi.Metadata; import org.apache.camel.spi.annotations.Dataformat; import org.apache.camel.support.service.ServiceSupport; import org.apache.camel.util.ObjectHelper; @@ -41,6 +42,10 @@ import org.apache.camel.util.StringHelper; import org.apache.commons.io.IOUtils; @Dataformat("protobuf") +@Metadata(excludeProperties = "library,objectMapper,useDefaultObjectMapper,jsonViewTypeName,jsonView,include,allowJmsType," + + "collectionTypeName,collectionType,useList,moduleClassNames,moduleRefs,enableFeatures," + + "disableFeatures,allowUnmarshallType,timezone,autoDiscoverObjectMapper," + + "schemaResolver,autoDiscoverSchemaResolver,unmarshalTypeName") public class ProtobufDataFormat extends ServiceSupport implements DataFormat, DataFormatName, DataFormatContentTypeHeader, CamelContextAware { diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties index b6fed71..a1e8bcb 100644 --- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties +++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties @@ -18,6 +18,33 @@ atomix-queue atomix-set atomix-value avro +aws-secrets-manager +aws2-athena +aws2-cw +aws2-ddb +aws2-ddbstream +aws2-ec2 +aws2-ecs +aws2-eks +aws2-eventbridge +aws2-iam +aws2-kinesis +aws2-kinesis-firehose +aws2-kms +aws2-lambda +aws2-mq +aws2-msk +aws2-s3 +aws2-ses +aws2-sns +aws2-sqs +aws2-sts +aws2-translate +azure-cosmosdb +azure-eventhubs +azure-storage-blob +azure-storage-datalake +azure-storage-queue bean bean-validator beanstalk @@ -51,6 +78,10 @@ cxfrs dataformat dataset dataset-test +debezium-mongodb +debezium-mysql +debezium-postgres +debezium-sqlserver digitalocean direct direct-vm @@ -83,6 +114,18 @@ ganglia geocoder git github +google-bigquery +google-bigquery-sql +google-calendar +google-calendar-stream +google-drive +google-functions +google-mail +google-mail-stream +google-pubsub +google-sheets +google-sheets-stream +google-storage gora grape graphql @@ -143,6 +186,7 @@ jsonata jt400 kafka kamelet +kamelet-reify kubernetes-config-maps kubernetes-custom-resources kubernetes-deployments @@ -169,6 +213,7 @@ lumberjack master metrics micrometer +microprofile-metrics milo-client milo-server mina @@ -253,6 +298,7 @@ splunk-hec spring-batch spring-event spring-integration +spring-jdbc spring-ldap spring-rabbitmq spring-redis @@ -277,6 +323,10 @@ twitter-timeline undertow validator velocity +vertx +vertx-http +vertx-kafka +vertx-websocket vm weather web3j diff --git a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java index 6b705915..67f4df9 100644 --- a/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java +++ b/core/camel-util/src/main/java/org/apache/camel/util/SensitiveUtils.java @@ -30,13 +30,18 @@ public final class SensitiveUtils { "accesskey", "accesstoken", "accesstokensecret", + "accountkey", "accountsid", "acltoken", "authorizationtoken", + "blobaccesskey", + "blobstoragesharedkeycredential", "certresourcepassword", "clientsecret", + "connectionstring", "consumerkey", "consumersecret", + "emailaddress", "fulltokenid", "httpproxypassword", "keypassword", @@ -50,6 +55,7 @@ public final class SensitiveUtils { "oauthclientsecret", "oauthtoken", "oauthtokenurl", + "p12filename", "passcode", "passphrase", "password", @@ -62,10 +68,12 @@ public final class SensitiveUtils { "proxypassword", "proxyuser", "publickeyid", + "queueownerawsaccountid", "refreshtoken", "sasljaasconfig", "secretkey", "securerandom", + "sharedaccesskey", "sslkeypassword", "sslkeystore", "sslkeystorepassword", diff --git a/docs/components/modules/dataformats/nav.adoc b/docs/components/modules/dataformats/nav.adoc index c3858af..135f439 100644 --- a/docs/components/modules/dataformats/nav.adoc +++ b/docs/components/modules/dataformats/nav.adoc @@ -5,6 +5,7 @@ ** xref:dataformats:any23-dataformat.adoc[Any23] ** xref:dataformats:asn1-dataformat.adoc[ASN.1 File] ** xref:dataformats:avro-dataformat.adoc[Avro] +** xref:dataformats:avro-jackson-dataformat.adoc[Avro] ** xref:dataformats:barcode-dataformat.adoc[Barcode] ** xref:dataformats:base64-dataformat.adoc[Base64] ** xref:dataformats:beanio-dataformat.adoc[BeanIO] @@ -32,6 +33,7 @@ ** xref:dataformats:mime-multipart-dataformat.adoc[MIME Multipart] ** xref:dataformats:pgp-dataformat.adoc[PGP] ** xref:dataformats:protobuf-dataformat.adoc[Protobuf] +** xref:dataformats:protobuf-jackson-dataformat.adoc[Protobuf] ** xref:dataformats:rss-dataformat.adoc[RSS] ** xref:dataformats:soapjaxb-dataformat.adoc[SOAP] ** xref:dataformats:syslog-dataformat.adoc[Syslog] diff --git a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc b/docs/components/modules/dataformats/pages/avro-jackson-dataformat.adoc similarity index 93% rename from components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc rename to docs/components/modules/dataformats/pages/avro-jackson-dataformat.adoc index dfb41f2..b130656 100644 --- a/components/camel-jackson-avro/src/main/docs/jackson-avro-dataformat.adoc +++ b/docs/components/modules/dataformats/pages/avro-jackson-dataformat.adoc @@ -1,10 +1,13 @@ -[[jackson-avro-dataformat]] -= Jackson Avro DataFormat -:docTitle: Jackson Avro +[[avro-jackson-dataformat]] += Avro DataFormat +//THIS FILE IS COPIED: EDIT THE SOURCE FILE: +:page-source: components/camel-jackson-avro/src/main/docs/avro-jackson-dataformat.adoc +:docTitle: Avro :artifactId: camel-jackson-avro -:description: Unmarshal Avro payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Avro and back using Jackson +:since: 2.14 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/avro-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +44,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Avro dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc b/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc index 162c64d..6e2355a 100644 --- a/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc +++ b/docs/components/modules/dataformats/pages/json-jackson-dataformat.adoc @@ -26,7 +26,7 @@ from("activemq:My.Queue"). // dataformat options: START -The JSON Jackson dataformat supports 17 options, which are listed below. +The JSON Jackson dataformat supports 19 options, which are listed below. @@ -50,6 +50,8 @@ The JSON Jackson dataformat supports 17 options, which are listed below. | timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream. | autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry | contentTypeHeader | true | Boolean | 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 +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END diff --git a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc b/docs/components/modules/dataformats/pages/protobuf-jackson-dataformat.adoc similarity index 93% rename from components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc rename to docs/components/modules/dataformats/pages/protobuf-jackson-dataformat.adoc index 6b79de6..7a608c4 100644 --- a/components/camel-jackson-protobuf/src/main/docs/jackson-protobuf-dataformat.adoc +++ b/docs/components/modules/dataformats/pages/protobuf-jackson-dataformat.adoc @@ -1,10 +1,13 @@ -[[jackson-protobuf-dataformat]] -= Jackson Protobuf DataFormat -:docTitle: Jackson Protobuf +[[protobuf-jackson-dataformat]] += Protobuf DataFormat +//THIS FILE IS COPIED: EDIT THE SOURCE FILE: +:page-source: components/camel-jackson-protobuf/src/main/docs/protobuf-jackson-dataformat.adoc +:docTitle: Protobuf :artifactId: camel-jackson-protobuf -:description: Unmarshal Protobuf payloads to POJOs and back using Jackson. -:since: 3.10 +:description: Marshal POJOs to Protobuf and back using Jackson +:since: 2.2 :supportLevel: Stable +include::{cq-version}@camel-quarkus:ROOT:partial$reference/dataformats/protobuf-jackson.adoc[opts=optional] *Since Camel {since}* @@ -41,28 +44,31 @@ from("activemq:My.Queue"). // dataformat options: START -The JacksonXML dataformat supports 15 options, which are listed below. +The Protobuf dataformat supports 18 options, which are listed below. [width="100%",cols="2s,1m,1m,6",options="header"] |=== | Name | Default | Java Type | Description -| xmlMapper | | String | Lookup and use the existing XmlMapper with the given id. -| prettyPrint | false | Boolean | To enable pretty printing output nicely formatted. Is by default false. +| contentTypeHeader | true | Boolean | 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 +| objectMapper | | String | Lookup and use the existing ObjectMapper with the given id when using Jackson. +| useDefaultObjectMapper | true | Boolean | Whether to lookup and use default Jackson ObjectMapper from the registry. | unmarshalTypeName | | String | Class name of the java type to use when unmarshalling | jsonViewTypeName | | String | When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. With Jackson you can use JSON views to accomplish this. This option is to refer to the class which has JsonView annotations | include | | String | If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you want to skip these null values, you can set this option to NON_NULL | allowJmsType | false | Boolean | Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to use to unmarshal to. | collectionTypeName | | String | Refers to a custom collection type to lookup in the registry to use. This option should rarely be used, but allows to use different collection types than java.util.Collection based as default. | useList | false | Boolean | To unmarshal to a List of Map or a List of Pojo. -| enableJaxbAnnotationModule | false | Boolean | Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB annotations can be used by Jackson. | moduleClassNames | | String | To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with FQN class names. Multiple classes can be separated by comma. | moduleRefs | | String | To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma. | enableFeatures | | String | Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | disableFeatures | | String | Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The features should be a name that matches a enum from com.fasterxml.jackson.databind.SerializationFeature, com.fasterxml.jackson.databind.DeserializationFeature, or com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma | allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used. -| contentTypeHeader | true | Boolean | 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 +| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. +| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry +| schemaResolver | | String | Optional schema resolver used to lookup schemas for the data in transit. +| autoDiscoverSchemaResolver | true | Boolean | When not disabled, the SchemaResolver will be looked up into the registry |=== // dataformat options: END