You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/01 09:58:38 UTC

(camel) 01/01: CAMEL-20502: JacksonAvro should be default avro dataformat. Add schemaResolver with classname as option in the model.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch avro
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6f83727d819487253230efccf15178521250c5f3
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Mar 1 10:58:21 2024 +0100

    CAMEL-20502: JacksonAvro should be default avro dataformat. Add schemaResolver with classname as option in the model.
---
 .../camel/catalog/dataformats/avroJackson.json     |  2 +-
 .../apache/camel/catalog/dataformats/jackson.json  |  2 +-
 .../org/apache/camel/catalog/models/avro.json      |  4 +--
 .../org/apache/camel/catalog/models/json.json      |  2 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  |  2 +-
 .../camel-avro/src/main/docs/avro-dataformat.adoc  |  6 ++--
 .../avro/AvroMarshalAndUnmarshalTest.java          |  9 +++---
 .../camel/dataformat/avro/springDataFormat.xml     |  6 ++--
 .../camel/component/jackson/avro/avroJackson.json  |  2 +-
 .../src/main/docs/avroJackson-dataformat.adoc      |  2 +-
 .../avro/JacksonAvroLookupResolverTest.java        |  5 ++--
 .../JacksonAvroMarshalUnmarshalJsonNodeTest.java   |  5 ++--
 .../avro/JacksonAvroMarshalUnmarshalPojoTest.java  |  5 ++--
 .../apache/camel/component/jackson/jackson.json    |  2 +-
 .../org/apache/camel/model/dataformat/avro.json    |  4 +--
 .../org/apache/camel/model/dataformat/json.json    |  2 +-
 .../org/apache/camel/builder/DataFormatClause.java | 32 ++++++++++++++++++++--
 .../camel/model/dataformat/AvroDataFormat.java     | 11 ++++++--
 .../camel/model/dataformat/JsonDataFormat.java     |  2 +-
 .../ROOT/pages/camel-4x-upgrade-guide-4_5.adoc     |  3 ++
 .../dsl/yaml/deserializers/ModelDeserializers.java |  2 +-
 .../generated/resources/schema/camelYamlDsl.json   |  2 +-
 .../camel/maven/packaging/AllDslKotlinMojo.java    |  4 +++
 23 files changed, 77 insertions(+), 39 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avroJackson.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avroJackson.json
index 661ef79c860..89eb6a02f0b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avroJackson.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/avroJackson.json
@@ -33,7 +33,7 @@
     "timezone": { "index": 14, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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": { "index": 15, "kind": "attribute", "displayName": "Auto Discover Object Mapper", "label": "advanced", "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": { "index": 16, "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": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 18, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" }
   }
 }
diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jackson.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jackson.json
index 6aeb2a9afb1..2e5feb45425 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jackson.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats/jackson.json
@@ -33,7 +33,7 @@
     "disableFeatures": { "index": 14, "kind": "attribute", "displayName": "Disable Features", "label": "advanced", "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.Deserial [...]
     "allowUnmarshallType": { "index": 15, "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": { "index": 16, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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 and fastjson." },
-    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 18, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" },
     "namingStrategy": { "index": 19, "kind": "attribute", "displayName": "Naming Strategy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the the defined Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE, LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
     "contentTypeHeader": { "index": 20, "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" }
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 28f44212ce6..5cd02093fda 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
@@ -15,7 +15,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" },
     "instanceClassName": { "index": 1, "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": { "index": 2, "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "ApacheAvro", "Jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ApacheAvro", "description": "Which Avro library to use." },
+    "library": { "index": 2, "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "ApacheAvro", "Jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "avroJackson", "description": "Which Avro library to use." },
     "objectMapper": { "index": 3, "kind": "attribute", "displayName": "Object Mapper", "label": "advanced", "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": { "index": 4, "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." },
     "unmarshalType": { "index": 5, "kind": "attribute", "displayName": "Unmarshal Type", "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" },
@@ -32,7 +32,7 @@
     "timezone": { "index": 16, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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": { "index": 17, "kind": "attribute", "displayName": "Auto Discover Object Mapper", "label": "advanced", "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": { "index": 18, "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": { "index": 19, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 19, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 20, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" }
   }
 }
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 2a277d5c602..5adeb17da3d 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
@@ -30,7 +30,7 @@
     "disableFeatures": { "index": 15, "kind": "attribute", "displayName": "Disable Features", "label": "advanced", "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.Deserial [...]
     "allowUnmarshallType": { "index": 16, "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": { "index": 17, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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 and fastjson." },
-    "schemaResolver": { "index": 18, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 18, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 19, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" },
     "namingStrategy": { "index": 20, "kind": "attribute", "displayName": "Naming Strategy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the the defined Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE, LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
     "contentTypeHeader": { "index": 21, "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" },
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 f3ad55422af..e00b12e8833 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
@@ -7228,7 +7228,7 @@ Class name to use for marshal and unmarshalling.
           <xs:annotation>
             <xs:documentation xml:lang="en">
 <![CDATA[
-Which Avro library to use. Default value: ApacheAvro
+Which Avro library to use. Default value: avroJackson
 ]]>
             </xs:documentation>
           </xs:annotation>
diff --git a/components/camel-avro/src/main/docs/avro-dataformat.adoc b/components/camel-avro/src/main/docs/avro-dataformat.adoc
index 6f2fb2f39f3..9d1ff37f7af 100644
--- a/components/camel-avro/src/main/docs/avro-dataformat.adoc
+++ b/components/camel-avro/src/main/docs/avro-dataformat.adoc
@@ -15,6 +15,8 @@ This component provides a dataformat for avro, which allows
 serialization and deserialization of messages using Apache Avro's binary
 dataformat. Since Camel 3.2 rpc functionality was moved into separate `camel-avro-rpc` component.
 
+TIP: There is also `camel-jackson-avro` which is a more powerful Camel dataformat for using Avro.
+
 Maven users will need to add the following dependency to their `pom.xml`
 for this component:
 
@@ -65,7 +67,7 @@ or in XML
         <route>
             <from uri="direct:in"/>
             <marshal>
-                <avro instanceClass="org.apache.camel.dataformat.avro.Message"/>
+                <avro instanceClass="org.apache.camel.dataformat.avro.Message" library="ApacheAvro"/>
             </marshal>
             <to uri="log:out"/>
         </route>
@@ -79,7 +81,7 @@ reference it from your route.
 --------------------------------------------------------------------------------------
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
          <dataFormats>
-            <avro id="avro" instanceClass="org.apache.camel.dataformat.avro.Message"/>
+            <avro id="avro" instanceClass="org.apache.camel.dataformat.avro.Message" library="ApacheAvro"/>
         </dataFormats>
         <route>
             <from uri="direct:in"/>
diff --git a/components/camel-avro/src/test/java/org/apache/camel/dataformat/avro/AvroMarshalAndUnmarshalTest.java b/components/camel-avro/src/test/java/org/apache/camel/dataformat/avro/AvroMarshalAndUnmarshalTest.java
index a2a73555df4..ea8b621d569 100644
--- a/components/camel-avro/src/test/java/org/apache/camel/dataformat/avro/AvroMarshalAndUnmarshalTest.java
+++ b/components/camel-avro/src/test/java/org/apache/camel/dataformat/avro/AvroMarshalAndUnmarshalTest.java
@@ -20,6 +20,7 @@ import org.apache.camel.CamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.avro.example.Value;
+import org.apache.camel.model.dataformat.AvroLibrary;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
@@ -49,7 +50,7 @@ public class AvroMarshalAndUnmarshalTest extends CamelTestSupport {
             context.addRoutes(new RouteBuilder() {
                 @Override
                 public void configure() {
-                    from("direct:unmarshalC").unmarshal().avro(new CamelException("wrong schema"))
+                    from("direct:unmarshalC").unmarshal().avro(AvroLibrary.ApacheAvro, new CamelException("wrong schema"))
                             .to("mock:reverse");
                 }
             });
@@ -87,10 +88,10 @@ public class AvroMarshalAndUnmarshalTest extends CamelTestSupport {
                 from("direct:in").marshal(format);
                 from("direct:back").unmarshal(format).to("mock:reverse");
 
-                from("direct:marshal").marshal().avro();
-                from("direct:unmarshalA").unmarshal().avro(Value.class.getName()).to("mock:reverse");
+                from("direct:marshal").marshal().avro(AvroLibrary.ApacheAvro);
+                from("direct:unmarshalA").unmarshal().avro(AvroLibrary.ApacheAvro, Value.class.getName()).to("mock:reverse");
 
-                from("direct:unmarshalB").unmarshal().avro(Value.SCHEMA$).to("mock:reverse");
+                from("direct:unmarshalB").unmarshal().avro(AvroLibrary.ApacheAvro, Value.SCHEMA$).to("mock:reverse");
             }
         };
     }
diff --git a/components/camel-avro/src/test/resources/org/apache/camel/dataformat/avro/springDataFormat.xml b/components/camel-avro/src/test/resources/org/apache/camel/dataformat/avro/springDataFormat.xml
index e1be597ea56..72a4cfd65ca 100644
--- a/components/camel-avro/src/test/resources/org/apache/camel/dataformat/avro/springDataFormat.xml
+++ b/components/camel-avro/src/test/resources/org/apache/camel/dataformat/avro/springDataFormat.xml
@@ -26,18 +26,18 @@
 
     <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
         <dataFormats>
-            <avro id="avro1" instanceClassName="org.apache.camel.dataformat.avro.example.Value"/>
+            <avro id="avro1" instanceClassName="org.apache.camel.dataformat.avro.example.Value" library="ApacheAvro"/>
         </dataFormats>
         <route>
             <from uri="direct:in"/>
             <marshal>
-                <avro instanceClassName="org.apache.camel.dataformat.avro.example.Value"/>
+                <avro instanceClassName="org.apache.camel.dataformat.avro.example.Value" library="ApacheAvro"/>
             </marshal>
         </route>
         <route>
             <from uri="direct:back"/>
             <unmarshal>
-                <avro instanceClassName="org.apache.camel.dataformat.avro.example.Value"/>
+                <avro instanceClassName="org.apache.camel.dataformat.avro.example.Value" library="ApacheAvro"/>
             </unmarshal>
             <to uri="mock:reverse"/>
         </route>
diff --git a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avroJackson.json b/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avroJackson.json
index 661ef79c860..89eb6a02f0b 100644
--- a/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avroJackson.json
+++ b/components/camel-jackson-avro/src/generated/resources/org/apache/camel/component/jackson/avro/avroJackson.json
@@ -33,7 +33,7 @@
     "timezone": { "index": 14, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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": { "index": 15, "kind": "attribute", "displayName": "Auto Discover Object Mapper", "label": "advanced", "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": { "index": 16, "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": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 18, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" }
   }
 }
diff --git a/components/camel-jackson-avro/src/main/docs/avroJackson-dataformat.adoc b/components/camel-jackson-avro/src/main/docs/avroJackson-dataformat.adoc
index 619c7f5dcaf..28eea1c57f5 100644
--- a/components/camel-jackson-avro/src/main/docs/avroJackson-dataformat.adoc
+++ b/components/camel-jackson-avro/src/main/docs/avroJackson-dataformat.adoc
@@ -26,7 +26,7 @@ annotated for JSON serialization/deserialization.
 [source,java]
 -------------------------------
 from("kafka:topic").
-  unmarshal().avro(AvroLibrary.Jackson, JsonNode.class).
+  unmarshal().avro(JsonNode.class).
   to("log:info");
 -------------------------------
 
diff --git a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroLookupResolverTest.java b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroLookupResolverTest.java
index aeebe04da45..ba09dedbe07 100644
--- a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroLookupResolverTest.java
+++ b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroLookupResolverTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jackson.SchemaResolver;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.dataformat.AvroLibrary;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
@@ -82,9 +81,9 @@ public class JacksonAvroLookupResolverTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("direct:serialized").unmarshal().avro(AvroLibrary.Jackson, Pojo.class, "schema-resolver-1")
+                from("direct:serialized").unmarshal().avro(Pojo.class, "schema-resolver-1")
                         .to("mock:pojo");
-                from("direct:pojo").marshal().avro(AvroLibrary.Jackson, Pojo.class, "schema-resolver-1").to("mock:serialized");
+                from("direct:pojo").marshal().avro(Pojo.class, "schema-resolver-1").to("mock:serialized");
             }
         };
     }
diff --git a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalJsonNodeTest.java b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalJsonNodeTest.java
index e7a231ec2fa..e3ba316097a 100644
--- a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalJsonNodeTest.java
+++ b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalJsonNodeTest.java
@@ -25,7 +25,6 @@ import org.apache.avro.Schema;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jackson.SchemaResolver;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.dataformat.AvroLibrary;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
@@ -134,8 +133,8 @@ public class JacksonAvroMarshalUnmarshalJsonNodeTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("direct:serialized").unmarshal().avro(AvroLibrary.Jackson, JsonNode.class).to("mock:pojo");
-                from("direct:pojo").marshal().avro(AvroLibrary.Jackson).to("mock:serialized");
+                from("direct:serialized").unmarshal().avro(JsonNode.class).to("mock:pojo");
+                from("direct:pojo").marshal().avro().to("mock:serialized");
             }
         };
     }
diff --git a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalPojoTest.java b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalPojoTest.java
index 12e6ea53480..7c1d5b93ed9 100644
--- a/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalPojoTest.java
+++ b/components/camel-jackson-avro/src/test/java/org/apache/camel/component/jackson/avro/JacksonAvroMarshalUnmarshalPojoTest.java
@@ -21,7 +21,6 @@ import org.apache.avro.Schema;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jackson.SchemaResolver;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.model.dataformat.AvroLibrary;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
@@ -76,8 +75,8 @@ public class JacksonAvroMarshalUnmarshalPojoTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() {
-                from("direct:serialized").unmarshal().avro(AvroLibrary.Jackson, Pojo.class).to("mock:pojo");
-                from("direct:pojo").marshal().avro(AvroLibrary.Jackson).to("mock:serialized");
+                from("direct:serialized").unmarshal().avro(Pojo.class).to("mock:pojo");
+                from("direct:pojo").marshal().avro().to("mock:serialized");
             }
         };
     }
diff --git a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/jackson.json b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/jackson.json
index 6aeb2a9afb1..2e5feb45425 100644
--- a/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/jackson.json
+++ b/components/camel-jackson/src/generated/resources/org/apache/camel/component/jackson/jackson.json
@@ -33,7 +33,7 @@
     "disableFeatures": { "index": 14, "kind": "attribute", "displayName": "Disable Features", "label": "advanced", "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.Deserial [...]
     "allowUnmarshallType": { "index": 15, "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": { "index": 16, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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 and fastjson." },
-    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 17, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 18, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" },
     "namingStrategy": { "index": 19, "kind": "attribute", "displayName": "Naming Strategy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the the defined Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE, LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
     "contentTypeHeader": { "index": 20, "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" }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/avro.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/avro.json
index 28f44212ce6..5cd02093fda 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/avro.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/avro.json
@@ -15,7 +15,7 @@
   "properties": {
     "id": { "index": 0, "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "The id of this node" },
     "instanceClassName": { "index": 1, "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": { "index": 2, "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "ApacheAvro", "Jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "ApacheAvro", "description": "Which Avro library to use." },
+    "library": { "index": 2, "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.AvroLibrary", "enum": [ "ApacheAvro", "Jackson" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "avroJackson", "description": "Which Avro library to use." },
     "objectMapper": { "index": 3, "kind": "attribute", "displayName": "Object Mapper", "label": "advanced", "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": { "index": 4, "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." },
     "unmarshalType": { "index": 5, "kind": "attribute", "displayName": "Unmarshal Type", "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" },
@@ -32,7 +32,7 @@
     "timezone": { "index": 16, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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": { "index": 17, "kind": "attribute", "displayName": "Auto Discover Object Mapper", "label": "advanced", "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": { "index": 18, "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": { "index": 19, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 19, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 20, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" }
   }
 }
diff --git a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/json.json b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/json.json
index 2a277d5c602..5adeb17da3d 100644
--- a/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/json.json
+++ b/core/camel-core-model/src/generated/resources/META-INF/org/apache/camel/model/dataformat/json.json
@@ -30,7 +30,7 @@
     "disableFeatures": { "index": 15, "kind": "attribute", "displayName": "Disable Features", "label": "advanced", "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.Deserial [...]
     "allowUnmarshallType": { "index": 16, "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": { "index": 17, "kind": "attribute", "displayName": "Timezone", "label": "advanced", "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 and fastjson." },
-    "schemaResolver": { "index": 18, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "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." },
+    "schemaResolver": { "index": 18, "kind": "attribute", "displayName": "Schema Resolver", "label": "advanced", "required": false, "type": "object", "javaType": "org.apache.camel.component.jackson.SchemaResolver", "deprecated": false, "autowired": false, "secret": false, "description": "Optional schema resolver used to lookup schemas for the data in transit." },
     "autoDiscoverSchemaResolver": { "index": 19, "kind": "attribute", "displayName": "Auto Discover Schema Resolver", "label": "advanced", "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" },
     "namingStrategy": { "index": 20, "kind": "attribute", "displayName": "Naming Strategy", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "If set then Jackson will use the the defined Property Naming Strategy.Possible values are: LOWER_CAMEL_CASE, LOWER_DOT_CASE, LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE" },
     "contentTypeHeader": { "index": 21, "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" },
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
index 4855d3502ff..16037efba3a 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -96,14 +96,30 @@ public class DataFormatClause<T extends ProcessorDefinition<?>> {
         return dataFormat(new AvroDataFormat());
     }
 
-    public T avro(Object schema) {
+    /**
+     * Uses Avro data format with tje given library and schema
+     */
+    public T avro(AvroLibrary library, Object schema) {
         AvroDataFormat dataFormat = new AvroDataFormat();
+        dataFormat.setLibrary(library);
         dataFormat.setSchema(schema);
         return dataFormat(dataFormat);
     }
 
-    public T avro(String instanceClassName) {
-        return dataFormat(new AvroDataFormat(instanceClassName));
+    /**
+     * Uses Avro data format with the given unmarshalType
+     */
+    public T avro(String unmarshalTypeName) {
+        return dataFormat(new AvroDataFormat(unmarshalTypeName));
+    }
+
+    /**
+     * Uses Avro data format with given library and unmarshalType
+     */
+    public T avro(AvroLibrary library, String unmarshalTypeName) {
+        AvroDataFormat df = new AvroDataFormat(unmarshalTypeName);
+        df.setLibrary(library);
+        return dataFormat(df);
     }
 
     /**
@@ -132,6 +148,16 @@ public class DataFormatClause<T extends ProcessorDefinition<?>> {
         return dataFormat(avroDataFormat);
     }
 
+    /**
+     * Uses the Avro data format with given unmarshalType and schemaResolver
+     */
+    public T avro(Class<?> unmarshalType, String schemaResolver) {
+        AvroDataFormat avroDataFormat = new AvroDataFormat();
+        avroDataFormat.setUnmarshalType(unmarshalType);
+        avroDataFormat.setSchemaResolver(schemaResolver);
+        return dataFormat(avroDataFormat);
+    }
+
     /**
      * Uses the Avro data format with given library, unmarshalType and schemaResolver
      */
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java
index 8c9aed5515a..00463544127 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java
@@ -46,8 +46,8 @@ public class AvroDataFormat extends DataFormatDefinition {
     @XmlAttribute
     private String instanceClassName;
     @XmlAttribute
-    @Metadata(defaultValue = "ApacheAvro")
-    private AvroLibrary library = AvroLibrary.ApacheAvro;
+    @Metadata(defaultValue = "avroJackson")
+    private AvroLibrary library = AvroLibrary.Jackson;
     @XmlAttribute
     @Metadata(label = "advanced")
     private String objectMapper;
@@ -94,7 +94,7 @@ public class AvroDataFormat extends DataFormatDefinition {
                             + " For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSON")
     private String contentTypeHeader;
     @XmlAttribute
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", javaType = "org.apache.camel.component.jackson.SchemaResolver")
     private String schemaResolver;
     @XmlAttribute
     @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true")
@@ -430,6 +430,11 @@ public class AvroDataFormat extends DataFormatDefinition {
     // Fluent builders
     //
 
+    public AvroDataFormat schema(Object schema) {
+        this.schema = schema;
+        return this;
+    }
+
     public AvroDataFormat objectMapper(String objectMapper) {
         this.objectMapper = objectMapper;
         return this;
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
index 78d90393f29..4811695bd0b 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
@@ -89,7 +89,7 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
     @Metadata(label = "advanced")
     private String timezone;
     @XmlAttribute
-    @Metadata(label = "advanced")
+    @Metadata(label = "advanced", javaType = "org.apache.camel.component.jackson.SchemaResolver")
     private String schemaResolver;
     @XmlAttribute
     @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "true")
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
index bdfe969ff7d..f39d273c170 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
@@ -82,6 +82,9 @@ Routes startup (total:2)
 Started demo (rest://post:helloapp)
 ----
 
+=== Avro Data Format
+
+The default library for the `avro` data format has changed from Apache Avro to Jackson Avro. We also use Jackson as default for the JSon dataformat.
 
 === Intercept EIP
 
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
index 68306931efa..ca500a2f450 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-deserializers/src/generated/java/org/apache/camel/dsl/yaml/deserializers/ModelDeserializers.java
@@ -631,7 +631,7 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
                     @YamlProperty(name = "include", type = "string", 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", displayName = "Include"),
                     @YamlProperty(name = "instanceClassName", type = "string", description = "Class name to use for marshal and unmarshalling", displayName = "Instance Class Name"),
                     @YamlProperty(name = "jsonView", type = "string", 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", displayName = "Json View"),
-                    @YamlProperty(name = "library", type = "enum:ApacheAvro,Jackson", defaultValue = "ApacheAvro", description = "Which Avro library to use.", displayName = "Library"),
+                    @YamlProperty(name = "library", type = "enum:ApacheAvro,Jackson", defaultValue = "avroJackson", description = "Which Avro library to use.", displayName = "Library"),
                     @YamlProperty(name = "moduleClassNames", type = "string", 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.", displayName = "Module Class Names"),
                     @YamlProperty(name = "moduleRefs", type = "string", description = "To use custom Jackson modules referred from the Camel registry. Multiple modules can be separated by comma.", displayName = "Module Refs"),
                     @YamlProperty(name = "objectMapper", type = "string", description = "Lookup and use the existing ObjectMapper with the given id when using Jackson.", displayName = "Object Mapper"),
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
index 3533326fdc1..4d57a6e2e5f 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camelYamlDsl.json
@@ -9805,7 +9805,7 @@
               "type" : "string",
               "title" : "Library",
               "description" : "Which Avro library to use.",
-              "default" : "ApacheAvro",
+              "default" : "avroJackson",
               "enum" : [ "ApacheAvro", "Jackson" ]
             },
             "moduleClassNames" : {
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java
index c0b2525b6b0..be59b8d7aef 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java
@@ -533,6 +533,10 @@ public class AllDslKotlinMojo extends AbstractGeneratorMojo {
     }
 
     private void appendPropertyBuilder(TypeSpec.Builder typeBuilder, String propertyName, TypeName javaType, Boolean toString) {
+        // skip org.apache.camel.component (as we can only depend on general java and camel types from camel-api and camel-core)
+        if (javaType.toString().startsWith("org.apache.camel.component")) {
+            return;
+        }
         FunSpec.Builder propertyBuilder = FunSpec.builder(propertyName);
         propertyBuilder.addParameter(propertyName, javaType);
         String code = "def.%s = %s".formatted(propertyName, propertyName);