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 2023/02/03 07:59:25 UTC

[camel] branch main updated (fa7ad9a1db2 -> 54684ea1b0a)

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

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


    from fa7ad9a1db2 Bump http-cache-semantics from 4.1.0 to 4.1.1 in /docs (#9287)
     new 8e5b6e0d92c Remove some of the xstream leftovers in json data formats
     new 54684ea1b0a Remove some of the xstream leftovers in json data formats

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/camel/catalog/dataformats/jackson.json  |   4 +-
 .../org/apache/camel/catalog/models/json.json      |   6 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  |  34 +-----
 .../apache/camel/component/jackson/jackson.json    |   4 +-
 .../src/main/docs/jackson-dataformat.adoc          |   2 +-
 .../camel/component/jackson/JacksonDataFormat.java |   4 +-
 .../src/main/docs/spring-ws-component.adoc         |   4 +-
 .../org/apache/camel/model/dataformat/json.json    |   6 +-
 .../camel/model/dataformat/JsonDataFormat.java     | 127 +--------------------
 .../apache/camel/model/dataformat/JsonLibrary.java |   3 +-
 .../reifier/dataformat/JsonDataFormatReifier.java  |  21 +---
 .../java/org/apache/camel/xml/in/ModelParser.java  |   2 -
 .../dsl/yaml/deserializers/ModelDeserializers.java |  14 +--
 .../generated/resources/schema/camel-yaml-dsl.json |   8 +-
 .../generated/resources/schema/camelYamlDsl.json   |   8 +-
 15 files changed, 23 insertions(+), 224 deletions(-)


[camel] 02/02: Remove some of the xstream leftovers in json data formats

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 54684ea1b0a876fa3963fbf66b96962c6a60a034
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Feb 3 08:59:09 2023 +0100

    Remove some of the xstream leftovers in json data formats
---
 .../org/apache/camel/catalog/models/json.json      |  3 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  | 19 ------
 .../src/main/docs/spring-ws-component.adoc         |  4 +-
 .../org/apache/camel/model/dataformat/json.json    |  3 +-
 .../camel/model/dataformat/JsonDataFormat.java     | 76 ----------------------
 .../apache/camel/model/dataformat/JsonLibrary.java |  3 +-
 .../reifier/dataformat/JsonDataFormatReifier.java  | 18 +----
 .../java/org/apache/camel/xml/in/ModelParser.java  |  1 -
 .../dsl/yaml/deserializers/ModelDeserializers.java |  8 +--
 .../generated/resources/schema/camel-yaml-dsl.json |  5 +-
 .../generated/resources/schema/camelYamlDsl.json   |  5 +-
 11 files changed, 10 insertions(+), 135 deletions(-)

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 965257a9e2f..072e27ba6fd 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
@@ -16,7 +16,7 @@
     "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." },
     "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 look for an objectMapper to use from the registry" },
     "prettyPrint": { "kind": "attribute", "displayName": "Pretty Print", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To enable pretty printing output nicely formatted. Is by default false." },
-    "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.JsonLibrary", "enum": [ "fastjson", "gson", "jackson", "johnzon", "jsonb", "x-stream" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Jackson", "description": "Which json library to use." },
+    "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.JsonLibrary", "enum": [ "fastjson", "gson", "jackson", "johnzon", "jsonb" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Jackson", "description": "Which json library to use." },
     "unmarshalType": { "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" },
     "jsonView": { "kind": "attribute", "displayName": "Json View", "label": "advanced", "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", "label": "advanced", "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" },
@@ -27,7 +27,6 @@
     "moduleRefs": { "kind": "attribute", "displayName": "Module Refs", "label": "advanced", "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", "label": "advanced", "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,  [...]
     "disableFeatures": { "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.DeserializationFeatur [...]
-    "permissions": { "kind": "attribute", "displayName": "Permissions", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml\/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in  [...]
     "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", "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": { "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." },
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 e65bb48c4ce..90d66b8b7ca 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
@@ -10028,23 +10028,6 @@ by comma.
           </xs:annotation>
         </xs:attribute>
                 
-        <xs:attribute name="permissions" type="xs:string">
-          <xs:annotation>
-            <xs:documentation xml:lang="en"><![CDATA[
-Adds permissions that controls which Java packages and classes XStream is
-allowed to use during unmarshal from xml/json to Java beans. A permission must
-be configured either here or globally using a JVM system property. The
-permission can be specified in a syntax where a plus sign is allow, and minus
-sign is deny. Wildcards is supported by using . as prefix. For example to allow
-com.foo and all subpackages then specfy com.foo.. Multiple permissions can be
-configured separated by comma, such as com.foo.,-com.foo.bar.MySecretBean. The
-following default permission is always included: -,java.lang.,java.util. unless
-its overridden by specifying a JVM system property with they key
-org.apache.camel.xstream.permissions.
-            ]]></xs:documentation>
-          </xs:annotation>
-        </xs:attribute>
-                
         <xs:attribute name="allowUnmarshallType" type="xs:string">
           <xs:annotation>
             <xs:documentation xml:lang="en"><![CDATA[
@@ -21348,8 +21331,6 @@ multiple certificates.
       <xs:enumeration value="Johnzon"/>
             
       <xs:enumeration value="Jsonb"/>
-            
-      <xs:enumeration value="XStream"/>
           
     </xs:restriction>
       
diff --git a/components/camel-spring-ws/src/main/docs/spring-ws-component.adoc b/components/camel-spring-ws/src/main/docs/spring-ws-component.adoc
index 1d98c05be60..0fb6ea0797b 100644
--- a/components/camel-spring-ws/src/main/docs/spring-ws-component.adoc
+++ b/components/camel-spring-ws/src/main/docs/spring-ws-component.adoc
@@ -487,8 +487,8 @@ An example of a route using `beanname`:
 == POJO (un)marshalling
 
 Camel's pluggable data formats offer support for
-pojo/xml marshalling using libraries such as JAXB, XStream, JibX, Castor
-and XMLBeans. You can use these data formats in your route to sent and
+pojo/xml marshalling using libraries such as JAXB.
+You can use these data formats in your route to sent and
 receive pojo's, to and from web services.
 
 When _accessing_ web services you can marshal the request and unmarshal
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
index 965257a9e2f..072e27ba6fd 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
@@ -16,7 +16,7 @@
     "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." },
     "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 look for an objectMapper to use from the registry" },
     "prettyPrint": { "kind": "attribute", "displayName": "Pretty Print", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "To enable pretty printing output nicely formatted. Is by default false." },
-    "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.JsonLibrary", "enum": [ "fastjson", "gson", "jackson", "johnzon", "jsonb", "x-stream" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Jackson", "description": "Which json library to use." },
+    "library": { "kind": "attribute", "displayName": "Library", "required": false, "type": "enum", "javaType": "org.apache.camel.model.dataformat.JsonLibrary", "enum": [ "fastjson", "gson", "jackson", "johnzon", "jsonb" ], "deprecated": false, "autowired": false, "secret": false, "defaultValue": "Jackson", "description": "Which json library to use." },
     "unmarshalType": { "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" },
     "jsonView": { "kind": "attribute", "displayName": "Json View", "label": "advanced", "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", "label": "advanced", "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" },
@@ -27,7 +27,6 @@
     "moduleRefs": { "kind": "attribute", "displayName": "Module Refs", "label": "advanced", "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", "label": "advanced", "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,  [...]
     "disableFeatures": { "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.DeserializationFeatur [...]
-    "permissions": { "kind": "attribute", "displayName": "Permissions", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml\/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in  [...]
     "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", "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": { "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." },
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 67b5fdda2b8..7d99a0fc744 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
@@ -85,9 +85,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
     @Metadata(label = "advanced")
     private String disableFeatures;
     @XmlAttribute
-    @Metadata(label = "advanced")
-    private String permissions;
-    @XmlAttribute
     @Metadata(javaType = "java.lang.Boolean")
     private String allowUnmarshallType;
     @XmlAttribute
@@ -138,7 +135,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         this.moduleRefs = builder.moduleRefs;
         this.enableFeatures = builder.enableFeatures;
         this.disableFeatures = builder.disableFeatures;
-        this.permissions = builder.permissions;
         this.allowUnmarshallType = builder.allowUnmarshallType;
         this.timezone = builder.timezone;
         this.schemaResolver = builder.schemaResolver;
@@ -367,45 +363,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         this.disableFeatures = disableFeatures;
     }
 
-    public String getPermissions() {
-        return permissions;
-    }
-
-    /**
-     * Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from
-     * xml/json to Java beans.
-     * <p/>
-     * A permission must be configured either here or globally using a JVM system property. The permission can be
-     * specified in a syntax where a plus sign is allow, and minus sign is deny. <br/>
-     * Wildcards is supported by using <tt>.*</tt> as prefix. For example to allow <tt>com.foo</tt> and all subpackages
-     * then specfy <tt>+com.foo.*</tt>. Multiple permissions can be configured separated by comma, such as
-     * <tt>+com.foo.*,-com.foo.bar.MySecretBean</tt>. <br/>
-     * The following default permission is always included: <tt>"-*,java.lang.*,java.util.*"</tt> unless its overridden
-     * by specifying a JVM system property with they key <tt>org.apache.camel.xstream.permissions</tt>.
-     */
-    public void setPermissions(String permissions) {
-        this.permissions = permissions;
-    }
-
-    /**
-     * To add permission for the given pojo classes.
-     *
-     * @param type the pojo class(es) xstream should use as allowed permission
-     * @see        #setPermissions(String)
-     */
-    public void setPermissions(Class<?>... type) {
-        setPermissions(toString(type));
-    }
-
-    private static String toString(Class<?>[] type) {
-        StringJoiner permissionsBuilder = new StringJoiner(",");
-        for (Class<?> clazz : type) {
-            permissionsBuilder.add("+");
-            permissionsBuilder.add(clazz.getName());
-        }
-        return permissionsBuilder.toString();
-    }
-
     public String getAllowUnmarshallType() {
         return allowUnmarshallType;
     }
@@ -577,11 +534,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         return this;
     }
 
-    public JsonDataFormat permissions(String permissions) {
-        this.permissions = permissions;
-        return this;
-    }
-
     public JsonDataFormat allowUnmarshallType(boolean allowUnmarshallType) {
         return allowUnmarshallType(Boolean.toString(allowUnmarshallType));
     }
@@ -634,7 +586,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         private String moduleRefs;
         private String enableFeatures;
         private String disableFeatures;
-        private String permissions;
         private String allowUnmarshallType;
         private String timezone;
         private String schemaResolver;
@@ -844,33 +795,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
             return this;
         }
 
-        /**
-         * Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal
-         * from xml/json to Java beans.
-         * <p/>
-         * A permission must be configured either here or globally using a JVM system property. The permission can be
-         * specified in a syntax where a plus sign is allow, and minus sign is deny. <br/>
-         * Wildcards is supported by using <tt>.*</tt> as prefix. For example to allow <tt>com.foo</tt> and all
-         * subpackages then specfy <tt>+com.foo.*</tt>. Multiple permissions can be configured separated by comma, such
-         * as <tt>+com.foo.*,-com.foo.bar.MySecretBean</tt>. <br/>
-         * The following default permission is always included: <tt>"-*,java.lang.*,java.util.*"</tt> unless its
-         * overridden by specifying a JVM system property with they key <tt>org.apache.camel.xstream.permissions</tt>.
-         */
-        public Builder permissions(String permissions) {
-            this.permissions = permissions;
-            return this;
-        }
-
-        /**
-         * To add permission for the given pojo classes.
-         *
-         * @param type the pojo class(es) xstream should use as allowed permission
-         * @see        #setPermissions(String)
-         */
-        public Builder permissions(Class<?>... type) {
-            return permissions(JsonDataFormat.toString(type));
-        }
-
         /**
          * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the
          * unmarshalling.
diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonLibrary.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonLibrary.java
index 931ded22c95..3e39209ec76 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonLibrary.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/JsonLibrary.java
@@ -30,8 +30,7 @@ public enum JsonLibrary {
     Gson("gson"),
     Jackson("jackson"),
     Johnzon("johnzon"),
-    Jsonb("jsonb"),
-    XStream("xstreamJson");
+    Jsonb("jsonb");
 
     private final String dataFormatName;
 
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
index 7bbfb85db04..6239826ad75 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
@@ -44,31 +44,17 @@ public class JsonDataFormatReifier extends DataFormatReifier<JsonDataFormat> {
         } else {
             properties.put("jsonView", definition.getJsonView());
         }
-        if (definition.getLibrary() != JsonLibrary.XStream) {
-            properties.put("unmarshalType", or(definition.getUnmarshalType(), definition.getUnmarshalTypeName()));
-        }
+        properties.put("unmarshalType", or(definition.getUnmarshalType(), definition.getUnmarshalTypeName()));
         properties.put("prettyPrint", definition.getPrettyPrint());
         properties.put("include", definition.getInclude());
         properties.put("allowJmsType", definition.getAllowJmsType());
-        if (definition.getLibrary() != JsonLibrary.XStream) {
-            properties.put("collectionType", or(definition.getCollectionType(), definition.getCollectionTypeName()));
-        }
+        properties.put("collectionType", or(definition.getCollectionType(), definition.getCollectionTypeName()));
         properties.put("useList", definition.getUseList());
         properties.put("moduleClassNames", definition.getModuleClassNames());
         properties.put("moduleRefs", definition.getModuleRefs());
         properties.put("enableFeatures", definition.getEnableFeatures());
         properties.put("disableFeatures", definition.getDisableFeatures());
         properties.put("allowUnmarshallType", definition.getAllowUnmarshallType());
-        if (definition.getLibrary() == JsonLibrary.XStream && definition.getPermissions() == null) {
-            // if we have the unmarshal type, but no permission set, then use it to be allowed
-            String type = definition.getUnmarshalTypeName();
-            if (type == null && definition.getUnmarshalType() != null) {
-                type = asTypeName(definition.getUnmarshalType());
-            }
-            properties.put("permissions", type);
-            // xstream has no unmarshalType option
-            properties.remove("unmarshalType");
-        }
         if (definition.getLibrary() == JsonLibrary.Jackson) {
             properties.put("schemaResolver", asRef(definition.getSchemaResolver()));
             properties.put("autoDiscoverSchemaResolver", definition.getAutoDiscoverSchemaResolver());
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index a7eccace2f5..f2591f42e37 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -2203,7 +2203,6 @@ public class ModelParser extends BaseParser {
                 case "moduleRefs": def.setModuleRefs(val); break;
                 case "namingStrategy": def.setNamingStrategy(val); break;
                 case "objectMapper": def.setObjectMapper(val); break;
-                case "permissions": def.setPermissions(val); break;
                 case "prettyPrint": def.setPrettyPrint(val); break;
                 case "schemaResolver": def.setSchemaResolver(val); break;
                 case "timezone": def.setTimezone(val); break;
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 a501feee39b..f877be981fb 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
@@ -7350,12 +7350,11 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
                     @YamlProperty(name = "id", type = "string"),
                     @YamlProperty(name = "include", type = "string"),
                     @YamlProperty(name = "json-view", type = "string"),
-                    @YamlProperty(name = "library", type = "enum:Fastjson,Gson,Jackson,Johnzon,Jsonb,XStream"),
+                    @YamlProperty(name = "library", type = "enum:Fastjson,Gson,Jackson,Johnzon,Jsonb"),
                     @YamlProperty(name = "module-class-names", type = "string"),
                     @YamlProperty(name = "module-refs", type = "string"),
                     @YamlProperty(name = "naming-strategy", type = "string"),
                     @YamlProperty(name = "object-mapper", type = "string"),
-                    @YamlProperty(name = "permissions", type = "string"),
                     @YamlProperty(name = "pretty-print", type = "boolean"),
                     @YamlProperty(name = "schema-resolver", type = "string"),
                     @YamlProperty(name = "timezone", type = "string"),
@@ -7457,11 +7456,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
                     target.setObjectMapper(val);
                     break;
                 }
-                case "permissions": {
-                    String val = asText(node);
-                    target.setPermissions(val);
-                    break;
-                }
                 case "pretty-print": {
                     String val = asText(node);
                     target.setPrettyPrint(val);
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index 6af7e948c74..131e169adc8 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -5224,7 +5224,7 @@
           },
           "library" : {
             "type" : "string",
-            "enum" : [ "Fastjson", "Gson", "Jackson", "Johnzon", "Jsonb", "XStream" ]
+            "enum" : [ "Fastjson", "Gson", "Jackson", "Johnzon", "Jsonb" ]
           },
           "module-class-names" : {
             "type" : "string"
@@ -5238,9 +5238,6 @@
           "object-mapper" : {
             "type" : "string"
           },
-          "permissions" : {
-            "type" : "string"
-          },
           "pretty-print" : {
             "type" : "boolean"
           },
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 b794a8d4c3a..deb7fcdf882 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
@@ -5128,7 +5128,7 @@
           },
           "library" : {
             "type" : "string",
-            "enum" : [ "Fastjson", "Gson", "Jackson", "Johnzon", "Jsonb", "XStream" ]
+            "enum" : [ "Fastjson", "Gson", "Jackson", "Johnzon", "Jsonb" ]
           },
           "moduleClassNames" : {
             "type" : "string"
@@ -5142,9 +5142,6 @@
           "objectMapper" : {
             "type" : "string"
           },
-          "permissions" : {
-            "type" : "string"
-          },
           "prettyPrint" : {
             "type" : "boolean"
           },


[camel] 01/02: Remove some of the xstream leftovers in json data formats

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 8e5b6e0d92c8fc3f0b9b7c62eb65f893d2856971
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Feb 3 07:12:15 2023 +0100

    Remove some of the xstream leftovers in json data formats
---
 .../apache/camel/catalog/dataformats/jackson.json  |  4 +-
 .../org/apache/camel/catalog/models/json.json      |  3 +-
 .../apache/camel/catalog/schemas/camel-spring.xsd  | 15 +------
 .../apache/camel/component/jackson/jackson.json    |  4 +-
 .../src/main/docs/jackson-dataformat.adoc          |  2 +-
 .../camel/component/jackson/JacksonDataFormat.java |  4 +-
 .../org/apache/camel/model/dataformat/json.json    |  3 +-
 .../camel/model/dataformat/JsonDataFormat.java     | 51 +---------------------
 .../reifier/dataformat/JsonDataFormatReifier.java  |  3 --
 .../java/org/apache/camel/xml/in/ModelParser.java  |  1 -
 .../dsl/yaml/deserializers/ModelDeserializers.java |  6 ---
 .../generated/resources/schema/camel-yaml-dsl.json |  3 --
 .../generated/resources/schema/camelYamlDsl.json   |  3 --
 13 files changed, 13 insertions(+), 89 deletions(-)

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 60a19f907ee..a4deb7f0ee8 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
@@ -3,7 +3,7 @@
     "kind": "dataformat",
     "name": "jackson",
     "title": "JSON Jackson",
-    "description": "Marshal POJOs to JSON and back using Jackson",
+    "description": "Marshal POJOs to JSON and back using Jackson.",
     "deprecated": false,
     "firstVersion": "2.0.0",
     "label": "dataformat,transformation,json",
@@ -31,7 +31,7 @@
     "enableFeatures": { "kind": "attribute", "displayName": "Enable Features", "label": "advanced", "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,  [...]
     "disableFeatures": { "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.DeserializationFeatur [...]
     "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", "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, fastjson and xstream." },
+    "timezone": { "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": { "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." },
     "autoDiscoverSchemaResolver": { "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": { "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" },
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 df79bce3d96..965257a9e2f 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
@@ -29,8 +29,7 @@
     "disableFeatures": { "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.DeserializationFeatur [...]
     "permissions": { "kind": "attribute", "displayName": "Permissions", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml\/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in  [...]
     "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", "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, fastjson and xstream." },
-    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "label": "advanced", "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  [...]
+    "timezone": { "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": { "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." },
     "autoDiscoverSchemaResolver": { "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": { "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" },
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 eb1b11b9fae..e65bb48c4ce 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
@@ -10059,19 +10059,8 @@ enabled when desired to be used. Default value: false
           <xs:annotation>
             <xs:documentation xml:lang="en"><![CDATA[
 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.
-            ]]></xs:documentation>
-          </xs:annotation>
-        </xs:attribute>
-                
-        <xs:attribute name="dropRootNode" type="xs:string">
-          <xs:annotation>
-            <xs:documentation xml:lang="en"><![CDATA[
-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.
-Default value: false
+option will have no effect on the others Json DataFormat, like gson and
+fastjson.
             ]]></xs:documentation>
           </xs:annotation>
         </xs:attribute>
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 60a19f907ee..a4deb7f0ee8 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
@@ -3,7 +3,7 @@
     "kind": "dataformat",
     "name": "jackson",
     "title": "JSON Jackson",
-    "description": "Marshal POJOs to JSON and back using Jackson",
+    "description": "Marshal POJOs to JSON and back using Jackson.",
     "deprecated": false,
     "firstVersion": "2.0.0",
     "label": "dataformat,transformation,json",
@@ -31,7 +31,7 @@
     "enableFeatures": { "kind": "attribute", "displayName": "Enable Features", "label": "advanced", "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,  [...]
     "disableFeatures": { "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.DeserializationFeatur [...]
     "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", "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, fastjson and xstream." },
+    "timezone": { "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": { "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." },
     "autoDiscoverSchemaResolver": { "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": { "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" },
diff --git a/components/camel-jackson/src/main/docs/jackson-dataformat.adoc b/components/camel-jackson/src/main/docs/jackson-dataformat.adoc
index 0f96603425d..9646bda3169 100644
--- a/components/camel-jackson/src/main/docs/jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/jackson-dataformat.adoc
@@ -2,7 +2,7 @@
 :doctitle: JSON Jackson
 :shortname: jackson
 :artifactid: camel-jackson
-:description: Marshal POJOs to JSON and back using Jackson
+:description: Marshal POJOs to JSON and back using Jackson.
 :since: 2.0
 :supportlevel: Stable
 //Manually maintained attributes
diff --git a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
index 092767524ee..d4243c5751e 100644
--- a/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
+++ b/components/camel-jackson/src/main/java/org/apache/camel/component/jackson/JacksonDataFormat.java
@@ -21,10 +21,10 @@ import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.annotations.Dataformat;
 
 /**
- * Marshal POJOs to JSON and back using <a href="https://github.com/FasterXML/jackson">Jackson</a>
+ * Marshal POJOs to JSON and back using Jackson.
  */
 @Dataformat("jackson")
-@Metadata(excludeProperties = "library,permissions,dropRootNode")
+@Metadata(excludeProperties = "library,permissions")
 public class JacksonDataFormat extends AbstractJacksonDataFormat {
 
     /**
diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
index df79bce3d96..965257a9e2f 100644
--- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
+++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/dataformat/json.json
@@ -29,8 +29,7 @@
     "disableFeatures": { "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.DeserializationFeatur [...]
     "permissions": { "kind": "attribute", "displayName": "Permissions", "label": "advanced", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml\/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in  [...]
     "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", "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, fastjson and xstream." },
-    "dropRootNode": { "kind": "attribute", "displayName": "Drop Root Node", "label": "advanced", "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  [...]
+    "timezone": { "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": { "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." },
     "autoDiscoverSchemaResolver": { "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": { "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" },
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 ac9f941da0e..67b5fdda2b8 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
@@ -94,9 +94,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
     @Metadata(label = "advanced")
     private String timezone;
     @XmlAttribute
-    @Metadata(label = "advanced", javaType = "java.lang.Boolean", defaultValue = "false")
-    private String dropRootNode;
-    @XmlAttribute
     @Metadata(label = "advanced")
     private String schemaResolver;
     @XmlAttribute
@@ -144,7 +141,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         this.permissions = builder.permissions;
         this.allowUnmarshallType = builder.allowUnmarshallType;
         this.timezone = builder.timezone;
-        this.dropRootNode = builder.dropRootNode;
         this.schemaResolver = builder.schemaResolver;
         this.autoDiscoverSchemaResolver = builder.autoDiscoverSchemaResolver;
         this.namingStrategy = builder.namingStrategy;
@@ -430,7 +426,7 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
 
     /**
      * 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.
+     * others Json DataFormat, like gson and fastjson.
      */
     public void setTimezone(String timezone) {
         this.timezone = timezone;
@@ -447,19 +443,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         this.autoDiscoverObjectMapper = autoDiscoverObjectMapper;
     }
 
-    public String getDropRootNode() {
-        return dropRootNode;
-    }
-
-    /**
-     * 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.
-     */
-    public void setDropRootNode(String dropRootNode) {
-        this.dropRootNode = dropRootNode;
-    }
-
     /**
      * Optional schema resolver used to lookup schemas for the data in transit.
      */
@@ -622,15 +605,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         return this;
     }
 
-    public JsonDataFormat dropRootNode(boolean dropRootNode) {
-        return dropRootNode(Boolean.toString(dropRootNode));
-    }
-
-    public JsonDataFormat dropRootNode(String dropRootNode) {
-        this.dropRootNode = dropRootNode;
-        return this;
-    }
-
     public JsonDataFormat namingStrategy(String namingStrategy) {
         this.namingStrategy = namingStrategy;
         return this;
@@ -663,7 +637,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
         private String permissions;
         private String allowUnmarshallType;
         private String timezone;
-        private String dropRootNode;
         private String schemaResolver;
         private String autoDiscoverSchemaResolver;
         private String namingStrategy;
@@ -922,7 +895,7 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
 
         /**
          * 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.
+         * the others Json DataFormat, like gson and fastjson.
          */
         public Builder timezone(String timezone) {
             this.timezone = timezone;
@@ -945,26 +918,6 @@ public class JsonDataFormat extends DataFormatDefinition implements ContentTypeH
             return this;
         }
 
-        /**
-         * 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.
-         */
-        public Builder dropRootNode(String dropRootNode) {
-            this.dropRootNode = dropRootNode;
-            return this;
-        }
-
-        /**
-         * 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.
-         */
-        public Builder dropRootNode(boolean dropRootNode) {
-            this.dropRootNode = Boolean.toString(dropRootNode);
-            return this;
-        }
-
         /**
          * Optional schema resolver used to lookup schemas for the data in transit.
          */
diff --git a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
index ed584fb3228..7bbfb85db04 100644
--- a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
+++ b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JsonDataFormatReifier.java
@@ -59,9 +59,6 @@ public class JsonDataFormatReifier extends DataFormatReifier<JsonDataFormat> {
         properties.put("enableFeatures", definition.getEnableFeatures());
         properties.put("disableFeatures", definition.getDisableFeatures());
         properties.put("allowUnmarshallType", definition.getAllowUnmarshallType());
-        if (definition.getLibrary() == JsonLibrary.XStream) {
-            properties.put("dropRootNode", definition.getDropRootNode());
-        }
         if (definition.getLibrary() == JsonLibrary.XStream && definition.getPermissions() == null) {
             // if we have the unmarshal type, but no permission set, then use it to be allowed
             String type = definition.getUnmarshalTypeName();
diff --git a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
index ecec40cae6b..a7eccace2f5 100644
--- a/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
+++ b/core/camel-xml-io/src/generated/java/org/apache/camel/xml/in/ModelParser.java
@@ -2195,7 +2195,6 @@ public class ModelParser extends BaseParser {
                 case "collectionType": def.setCollectionTypeName(val); break;
                 case "contentTypeHeader": def.setContentTypeHeader(val); break;
                 case "disableFeatures": def.setDisableFeatures(val); break;
-                case "dropRootNode": def.setDropRootNode(val); break;
                 case "enableFeatures": def.setEnableFeatures(val); break;
                 case "include": def.setInclude(val); break;
                 case "jsonView": def.setJsonViewTypeName(val); break;
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 3aa4cb8e5ca..a501feee39b 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
@@ -7346,7 +7346,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
                     @YamlProperty(name = "collection-type", type = "string"),
                     @YamlProperty(name = "content-type-header", type = "boolean"),
                     @YamlProperty(name = "disable-features", type = "string"),
-                    @YamlProperty(name = "drop-root-node", type = "boolean"),
                     @YamlProperty(name = "enable-features", type = "string"),
                     @YamlProperty(name = "id", type = "string"),
                     @YamlProperty(name = "include", type = "string"),
@@ -7414,11 +7413,6 @@ public final class ModelDeserializers extends YamlDeserializerSupport {
                     target.setDisableFeatures(val);
                     break;
                 }
-                case "drop-root-node": {
-                    String val = asText(node);
-                    target.setDropRootNode(val);
-                    break;
-                }
                 case "enable-features": {
                     String val = asText(node);
                     target.setEnableFeatures(val);
diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
index 798cbd30ac7..6af7e948c74 100644
--- a/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
+++ b/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/schema/camel-yaml-dsl.json
@@ -5210,9 +5210,6 @@
           "disable-features" : {
             "type" : "string"
           },
-          "drop-root-node" : {
-            "type" : "boolean"
-          },
           "enable-features" : {
             "type" : "string"
           },
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 533dc3b4b7e..b794a8d4c3a 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
@@ -5114,9 +5114,6 @@
           "disableFeatures" : {
             "type" : "string"
           },
-          "dropRootNode" : {
-            "type" : "boolean"
-          },
           "enableFeatures" : {
             "type" : "string"
           },