You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/08/24 16:22:04 UTC

[camel] 01/06: CAMEL-13590 First version json-patch component

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

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

commit 501e7fb7190fe4d1167b23c72c3bfdc1a1e55a05
Author: g.dedlovskiy <g....@isimplelab.com>
AuthorDate: Fri Aug 20 21:31:12 2021 +0300

    CAMEL-13590 First version json-patch component
---
 bom/camel-bom/pom.xml                              |   5 +
 components/camel-json-patch/pom.xml                |  53 +++++
 .../jsonpatch/JsonPatchComponentConfigurer.java    |  55 +++++
 .../jsonpatch/JsonPatchEndpointConfigurer.java     |  61 ++++++
 .../jsonpatch/JsonPatchEndpointUriFactory.java     |  64 ++++++
 .../services/org/apache/camel/component.properties |   7 +
 .../services/org/apache/camel/component/json-patch |   2 +
 .../apache/camel/configurer/json-patch-component   |   2 +
 .../apache/camel/configurer/json-patch-endpoint    |   2 +
 .../apache/camel/urifactory/json-patch-endpoint    |   2 +
 .../camel/component/jsonpatch/json-patch.json      |  34 ++++
 .../component/jsonpatch/JsonPatchComponent.java    |  32 +++
 .../component/jsonpatch/JsonPatchConstants.java    |  24 +++
 .../component/jsonpatch/JsonPatchEndpoint.java     |  57 ++++++
 .../component/jsonpatch/JsonPatchProducer.java     |  55 +++++
 .../services/org/apache/camel/component/json-patch |   1 +
 .../jsonpatch/JsonPatchComponentTest.java          |  59 ++++++
 .../src/test/resources/log4j2.properties           |  23 +++
 .../apache/camel/component/jsonpatch/patch.json    |   1 +
 .../camel/component/jsonpatch/patch_error.json     |   1 +
 components/pom.xml                                 |   1 +
 core/camel-allcomponents/pom.xml                   |   4 +
 .../component/ComponentsBuilderFactory.java        |  13 ++
 .../dsl/JsonPatchComponentBuilderFactory.java      | 121 +++++++++++
 .../src/generated/resources/metadata.json          |  22 ++
 .../builder/endpoint/EndpointBuilderFactory.java   |   1 +
 .../camel/builder/endpoint/EndpointBuilders.java   |   1 +
 .../builder/endpoint/StaticEndpointBuilders.java   |  51 +++++
 .../dsl/JsonPatchEndpointBuilderFactory.java       | 224 +++++++++++++++++++++
 parent/pom.xml                                     |   5 +
 30 files changed, 983 insertions(+)

diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index 5c6b6ab..f549133 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -1204,6 +1204,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.camel</groupId>
+        <artifactId>camel-json-patch</artifactId>
+        <version>${project.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.camel</groupId>
         <artifactId>camel-jt400</artifactId>
         <version>${project.version}</version>
       </dependency>
diff --git a/components/camel-json-patch/pom.xml b/components/camel-json-patch/pom.xml
new file mode 100644
index 0000000..3810be1
--- /dev/null
+++ b/components/camel-json-patch/pom.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>components</artifactId>
+    <version>3.12.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-json-patch</artifactId>
+  <packaging>jar</packaging>
+  <name>Camel :: JsonPatch</name>
+  <description>Camel JsonPatch Component</description>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.github.java-json-tools</groupId>
+      <artifactId>json-patch</artifactId>
+      <version>1.13</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-support</artifactId>
+    </dependency>
+ 
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>
diff --git a/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchComponentConfigurer.java b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchComponentConfigurer.java
new file mode 100644
index 0000000..2311fb9
--- /dev/null
+++ b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchComponentConfigurer.java
@@ -0,0 +1,55 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.jsonpatch;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class JsonPatchComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+        JsonPatchComponent target = (JsonPatchComponent) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "autowiredenabled":
+        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+    @Override
+    public Class<?> getOptionType(String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "autowiredenabled":
+        case "autowiredEnabled": return boolean.class;
+        case "lazystartproducer":
+        case "lazyStartProducer": return boolean.class;
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+        JsonPatchComponent target = (JsonPatchComponent) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "autowiredenabled":
+        case "autowiredEnabled": return target.isAutowiredEnabled();
+        case "lazystartproducer":
+        case "lazyStartProducer": return target.isLazyStartProducer();
+        default: return null;
+        }
+    }
+}
+
diff --git a/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointConfigurer.java b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointConfigurer.java
new file mode 100644
index 0000000..1586fba
--- /dev/null
+++ b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointConfigurer.java
@@ -0,0 +1,61 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.jsonpatch;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@SuppressWarnings("unchecked")
+public class JsonPatchEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
+
+    @Override
+    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
+        JsonPatchEndpoint target = (JsonPatchEndpoint) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "allowcontextmapall":
+        case "allowContextMapAll": target.setAllowContextMapAll(property(camelContext, boolean.class, value)); return true;
+        case "contentcache":
+        case "contentCache": target.setContentCache(property(camelContext, boolean.class, value)); return true;
+        case "lazystartproducer":
+        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
+        default: return false;
+        }
+    }
+
+    @Override
+    public Class<?> getOptionType(String name, boolean ignoreCase) {
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "allowcontextmapall":
+        case "allowContextMapAll": return boolean.class;
+        case "contentcache":
+        case "contentCache": return boolean.class;
+        case "lazystartproducer":
+        case "lazyStartProducer": return boolean.class;
+        default: return null;
+        }
+    }
+
+    @Override
+    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+        JsonPatchEndpoint target = (JsonPatchEndpoint) obj;
+        switch (ignoreCase ? name.toLowerCase() : name) {
+        case "allowcontextmapall":
+        case "allowContextMapAll": return target.isAllowContextMapAll();
+        case "contentcache":
+        case "contentCache": return target.isContentCache();
+        case "lazystartproducer":
+        case "lazyStartProducer": return target.isLazyStartProducer();
+        default: return null;
+        }
+    }
+}
+
diff --git a/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointUriFactory.java b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointUriFactory.java
new file mode 100644
index 0000000..423e2fb
--- /dev/null
+++ b/components/camel-json-patch/src/generated/java/org/apache/camel/component/jsonpatch/JsonPatchEndpointUriFactory.java
@@ -0,0 +1,64 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.jsonpatch;
+
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+public class JsonPatchEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {
+
+    private static final String BASE = ":resourceUri";
+
+    private static final Set<String> PROPERTY_NAMES;
+    private static final Set<String> SECRET_PROPERTY_NAMES;
+    static {
+        Set<String> props = new HashSet<>(4);
+        props.add("lazyStartProducer");
+        props.add("contentCache");
+        props.add("allowContextMapAll");
+        props.add("resourceUri");
+        PROPERTY_NAMES = Collections.unmodifiableSet(props);
+        SECRET_PROPERTY_NAMES = Collections.emptySet();
+    }
+
+    @Override
+    public boolean isEnabled(String scheme) {
+        return "json-patch".equals(scheme);
+    }
+
+    @Override
+    public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
+        String syntax = scheme + BASE;
+        String uri = syntax;
+
+        Map<String, Object> copy = new HashMap<>(properties);
+
+        uri = buildPathParameter(syntax, uri, "resourceUri", null, true, copy);
+        uri = buildQueryParameters(uri, copy, encode);
+        return uri;
+    }
+
+    @Override
+    public Set<String> propertyNames() {
+        return PROPERTY_NAMES;
+    }
+
+    @Override
+    public Set<String> secretPropertyNames() {
+        return SECRET_PROPERTY_NAMES;
+    }
+
+    @Override
+    public boolean isLenientProperties() {
+        return false;
+    }
+}
+
diff --git a/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component.properties b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 0000000..9533cf2
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=json-patch
+groupId=org.apache.camel
+artifactId=camel-json-patch
+version=3.12.0-SNAPSHOT
+projectName=Camel :: JsonPatch
+projectDescription=Camel JsonPatch Component
diff --git a/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component/json-patch b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component/json-patch
new file mode 100644
index 0000000..0a83be5
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/component/json-patch
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.jsonpatch.JsonPatchComponent
diff --git a/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-component b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-component
new file mode 100644
index 0000000..283807c
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.jsonpatch.JsonPatchComponentConfigurer
diff --git a/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-endpoint b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-endpoint
new file mode 100644
index 0000000..45eb0a8
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/configurer/json-patch-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.jsonpatch.JsonPatchEndpointConfigurer
diff --git a/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/urifactory/json-patch-endpoint b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/urifactory/json-patch-endpoint
new file mode 100644
index 0000000..5b80a5c
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/META-INF/services/org/apache/camel/urifactory/json-patch-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.jsonpatch.JsonPatchEndpointUriFactory
diff --git a/components/camel-json-patch/src/generated/resources/org/apache/camel/component/jsonpatch/json-patch.json b/components/camel-json-patch/src/generated/resources/org/apache/camel/component/jsonpatch/json-patch.json
new file mode 100644
index 0000000..6490454
--- /dev/null
+++ b/components/camel-json-patch/src/generated/resources/org/apache/camel/component/jsonpatch/json-patch.json
@@ -0,0 +1,34 @@
+{
+  "component": {
+    "kind": "component",
+    "name": "json-patch",
+    "title": "JsonPatch",
+    "description": "JsonPatch component which transform JSON using JSON patch (RFC 6902).",
+    "deprecated": false,
+    "firstVersion": "3.12.0-SNAPSHOT",
+    "label": "transformation",
+    "javaType": "org.apache.camel.component.jsonpatch.JsonPatchComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-json-patch",
+    "version": "3.12.0-SNAPSHOT",
+    "scheme": "json-patch",
+    "extendsScheme": "",
+    "syntax": "json-patch:resourceUri",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": true,
+    "lenientProperties": false
+  },
+  "componentProperties": {
+    "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during star [...]
+    "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...]
+  },
+  "properties": {
+    "resourceUri": { "kind": "path", "displayName": "Resource Uri", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these protocols (classpath is default). ref will lookup the resource in the registry. bean will [...]
+    "allowContextMapAll": { "kind": "parameter", "displayName": "Allow Context Map All", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether the context map should allow access to all details. By default only the message body and headers can be accessed. This option can be enabled for full access to the current Exchange and CamelContext. [...]
+    "contentCache": { "kind": "parameter", "displayName": "Content Cache", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Sets whether to use resource content cache or not" },
+    "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during sta [...]
+  }
+}
diff --git a/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchComponent.java b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchComponent.java
new file mode 100644
index 0000000..851cef8
--- /dev/null
+++ b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchComponent.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonpatch;
+
+import java.util.Map;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.support.DefaultComponent;
+
+@org.apache.camel.spi.annotations.Component("json-patch")
+public class JsonPatchComponent extends DefaultComponent {
+
+    protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
+        Endpoint endpoint = new JsonPatchEndpoint(uri, this, remaining);
+        setProperties(endpoint, parameters);
+        return endpoint;
+    }
+}
diff --git a/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchConstants.java b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchConstants.java
new file mode 100644
index 0000000..45d9689
--- /dev/null
+++ b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchConstants.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonpatch;
+
+public final class JsonPatchConstants {
+    public static final String JSON_PATCH_RESOURCE_URI = "CamelJsonPatchResourceUri";
+
+    private JsonPatchConstants() {
+    }
+}
diff --git a/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchEndpoint.java b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchEndpoint.java
new file mode 100644
index 0000000..d4f1bfe
--- /dev/null
+++ b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchEndpoint.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonpatch;
+
+import org.apache.camel.Category;
+import org.apache.camel.Consumer;
+import org.apache.camel.ExchangePattern;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.component.ResourceEndpoint;
+import org.apache.camel.spi.UriEndpoint;
+
+/**
+ * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+ */
+@UriEndpoint(firstVersion = "3.12.0-SNAPSHOT", scheme = "json-patch", title = "JsonPatch", syntax = "json-patch:resourceUri",
+             producerOnly = true,
+             category = { Category.TRANSFORMATION })
+public class JsonPatchEndpoint extends ResourceEndpoint {
+
+    public JsonPatchEndpoint() {
+    }
+
+    public JsonPatchEndpoint(String uri, JsonPatchComponent component, String resourceUri) {
+        super(uri, component, resourceUri);
+    }
+
+    @Override
+    public ExchangePattern getExchangePattern() {
+        return ExchangePattern.InOut;
+    }
+
+    @Override
+    public Producer createProducer() {
+        return new JsonPatchProducer(this);
+    }
+
+    @Override
+    public Consumer createConsumer(Processor processor) throws UnsupportedOperationException {
+        throw new UnsupportedOperationException("You cannot consume from this endpoint");
+    }
+
+}
diff --git a/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchProducer.java b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchProducer.java
new file mode 100644
index 0000000..1e8cb2a
--- /dev/null
+++ b/components/camel-json-patch/src/main/java/org/apache/camel/component/jsonpatch/JsonPatchProducer.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonpatch;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.github.fge.jsonpatch.JsonPatch;
+import org.apache.camel.Exchange;
+import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.ResourceHelper;
+
+public class JsonPatchProducer extends DefaultProducer {
+    private final JsonPatchEndpoint endpoint;
+    private final ObjectMapper objectMapper;
+
+    public JsonPatchProducer(JsonPatchEndpoint endpoint) {
+        this(endpoint, new ObjectMapper());
+    }
+
+    public JsonPatchProducer(JsonPatchEndpoint endpoint, ObjectMapper objectMapper) {
+        super(endpoint);
+        this.endpoint = endpoint;
+        this.objectMapper = objectMapper;
+    }
+
+    public void process(Exchange exchange) throws Exception {
+        String resourceUri = exchange.getIn().getHeader(JsonPatchConstants.JSON_PATCH_RESOURCE_URI, String.class);
+        if (resourceUri == null || resourceUri.isEmpty()) {
+            resourceUri = endpoint.getResourceUri();
+        }
+
+        final JsonPatch patch = objectMapper.readValue(
+                ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext(), resourceUri),
+                JsonPatch.class);
+        JsonNode input = objectMapper.readTree(exchange.getIn().getBody(String.class));
+        JsonNode result = patch.apply(input);
+        exchange.getMessage().setBody(result.toString());
+
+    }
+
+}
diff --git a/components/camel-json-patch/src/main/resources/META-INF/services/org/apache/camel/component/json-patch b/components/camel-json-patch/src/main/resources/META-INF/services/org/apache/camel/component/json-patch
new file mode 100644
index 0000000..3b50325
--- /dev/null
+++ b/components/camel-json-patch/src/main/resources/META-INF/services/org/apache/camel/component/json-patch
@@ -0,0 +1 @@
+class=org.apache.camel.component.jsonpatch.JsonPatchComponent
diff --git a/components/camel-json-patch/src/test/java/org/apache/camel/component/jsonpatch/JsonPatchComponentTest.java b/components/camel-json-patch/src/test/java/org/apache/camel/component/jsonpatch/JsonPatchComponentTest.java
new file mode 100644
index 0000000..9ce3786
--- /dev/null
+++ b/components/camel-json-patch/src/test/java/org/apache/camel/component/jsonpatch/JsonPatchComponentTest.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jsonpatch;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.Test;
+
+public class JsonPatchComponentTest extends CamelTestSupport {
+
+    @Test
+    public void testCamelJsonPatch() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        sendBody("direct:foo", "{ \"a\": \"b\" }");
+        assertEquals(1, mock.getReceivedExchanges().size());
+        assertEquals("{\"c\":\"b\"}", mock.getReceivedExchanges().get(0).getIn().getBody(String.class));
+    }
+
+    @Test
+    public void testSendToDeadLetterChannelIfPatchError() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:errors");
+        String source = "{ \"a\": \"b\" }";
+        sendBody("direct:patch_error", source);
+        assertEquals(1, mock.getReceivedExchanges().size());
+        assertEquals(source, mock.getReceivedExchanges().get(0).getIn().getBody(String.class));
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+            public void configure() {
+                from("direct:foo")
+                        .to("json-patch:org/apache/camel/component/jsonpatch/patch.json")
+                        .to("mock:result");
+
+                from("direct:patch_error")
+                        .errorHandler(deadLetterChannel("mock:errors"))
+                        .to("json-patch:org/apache/camel/component/jsonpatch/patch_error.json");
+
+            }
+        };
+    }
+
+}
diff --git a/components/camel-json-patch/src/test/resources/log4j2.properties b/components/camel-json-patch/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..d9f0508
--- /dev/null
+++ b/components/camel-json-patch/src/test/resources/log4j2.properties
@@ -0,0 +1,23 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.out.ref = out
diff --git a/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch.json b/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch.json
new file mode 100644
index 0000000..1d8d7c2
--- /dev/null
+++ b/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch.json
@@ -0,0 +1 @@
+[ { "op": "move", "from": "/a", "path": "/c" } ]
\ No newline at end of file
diff --git a/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch_error.json b/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch_error.json
new file mode 100644
index 0000000..77773b0
--- /dev/null
+++ b/components/camel-json-patch/src/test/resources/org/apache/camel/component/jsonpatch/patch_error.json
@@ -0,0 +1 @@
+[ { "op": "123", "from": "/c", "path": "/a" } ]
\ No newline at end of file
diff --git a/components/pom.xml b/components/pom.xml
index bdb4463..4e44146 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -209,6 +209,7 @@
         <module>camel-jsonata</module>
         <module>camel-jsonb</module>
         <module>camel-jsonpath</module>
+        <module>camel-json-patch</module>
         <module>camel-jt400</module>
         <module>camel-jta</module>
         <module>camel-kafka</module>
diff --git a/core/camel-allcomponents/pom.xml b/core/camel-allcomponents/pom.xml
index ba1aebe..a96c95f 100644
--- a/core/camel-allcomponents/pom.xml
+++ b/core/camel-allcomponents/pom.xml
@@ -795,6 +795,10 @@
 		</dependency>
 		<dependency>
 			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-json-patch</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
 			<artifactId>camel-json-validator</artifactId>
 		</dependency>
 		<dependency>
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index 97beb0b..59ffca1 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -2530,6 +2530,19 @@ public interface ComponentsBuilderFactory {
         return org.apache.camel.builder.component.dsl.JsltComponentBuilderFactory.jslt();
     }
     /**
+     * JsonPatch (camel-json-patch)
+     * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+     * 
+     * Category: transformation
+     * Since: 3.12.0-SNAPSHOT
+     * Maven coordinates: org.apache.camel:camel-json-patch
+     * 
+     * @return the dsl builder
+     */
+    static org.apache.camel.builder.component.dsl.JsonPatchComponentBuilderFactory.JsonPatchComponentBuilder jsonPatch() {
+        return org.apache.camel.builder.component.dsl.JsonPatchComponentBuilderFactory.jsonPatch();
+    }
+    /**
      * JSON Schema Validator (camel-json-validator)
      * Validate JSON payloads using NetworkNT JSON Schema.
      * 
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsonPatchComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsonPatchComponentBuilderFactory.java
new file mode 100644
index 0000000..1c3fab2
--- /dev/null
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/JsonPatchComponentBuilderFactory.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.component.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.jsonpatch.JsonPatchComponent;
+
+/**
+ * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+ * 
+ * Generated by camel-package-maven-plugin - do not edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface JsonPatchComponentBuilderFactory {
+
+    /**
+     * JsonPatch (camel-json-patch)
+     * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+     * 
+     * Category: transformation
+     * Since: 3.12.0-SNAPSHOT
+     * Maven coordinates: org.apache.camel:camel-json-patch
+     * 
+     * @return the dsl builder
+     */
+    static JsonPatchComponentBuilder jsonPatch() {
+        return new JsonPatchComponentBuilderImpl();
+    }
+
+    /**
+     * Builder for the JsonPatch component.
+     */
+    interface JsonPatchComponentBuilder
+            extends
+                ComponentBuilder<JsonPatchComponent> {
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing time
+         * of the processing.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param lazyStartProducer the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchComponentBuilder lazyStartProducer(
+                boolean lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * Whether autowiring is enabled. This is used for automatic autowiring
+         * options (the option must be marked as autowired) by looking up in the
+         * registry to find if there is a single instance of matching type,
+         * which then gets configured on the component. This can be used for
+         * automatic configuring JDBC data sources, JMS connection factories,
+         * AWS Clients, etc.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: true
+         * Group: advanced
+         * 
+         * @param autowiredEnabled the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchComponentBuilder autowiredEnabled(
+                boolean autowiredEnabled) {
+            doSetProperty("autowiredEnabled", autowiredEnabled);
+            return this;
+        }
+    }
+
+    class JsonPatchComponentBuilderImpl
+            extends
+                AbstractComponentBuilder<JsonPatchComponent>
+            implements
+                JsonPatchComponentBuilder {
+        @Override
+        protected JsonPatchComponent buildConcreteComponent() {
+            return new JsonPatchComponent();
+        }
+        @Override
+        protected boolean setPropertyOnComponent(
+                Component component,
+                String name,
+                Object value) {
+            switch (name) {
+            case "lazyStartProducer": ((JsonPatchComponent) component).setLazyStartProducer((boolean) value); return true;
+            case "autowiredEnabled": ((JsonPatchComponent) component).setAutowiredEnabled((boolean) value); return true;
+            default: return false;
+            }
+        }
+    }
+}
\ No newline at end of file
diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json
index 58ba9aa..d8cd7e6 100644
--- a/core/camel-componentdsl/src/generated/resources/metadata.json
+++ b/core/camel-componentdsl/src/generated/resources/metadata.json
@@ -4148,6 +4148,28 @@
     "producerOnly": true,
     "lenientProperties": false
   },
+  "JsonPatchComponentBuilderFactory": {
+    "kind": "component",
+    "name": "json-patch",
+    "title": "JsonPatch",
+    "description": "JsonPatch component which transform JSON using JSON patch (RFC 6902).",
+    "deprecated": false,
+    "firstVersion": "3.12.0-SNAPSHOT",
+    "label": "transformation",
+    "javaType": "org.apache.camel.component.jsonpatch.JsonPatchComponent",
+    "supportLevel": "Preview",
+    "groupId": "org.apache.camel",
+    "artifactId": "camel-json-patch",
+    "version": "3.12.0-SNAPSHOT",
+    "scheme": "json-patch",
+    "extendsScheme": "",
+    "syntax": "json-patch:resourceUri",
+    "async": false,
+    "api": false,
+    "consumerOnly": false,
+    "producerOnly": true,
+    "lenientProperties": false
+  },
   "JsonValidatorComponentBuilderFactory": {
     "kind": "component",
     "name": "json-validator",
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 521b8f7..ec95bc4 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -194,6 +194,7 @@ public interface EndpointBuilderFactory
             org.apache.camel.builder.endpoint.dsl.JooqEndpointBuilderFactory.JooqBuilders,
             org.apache.camel.builder.endpoint.dsl.JpaEndpointBuilderFactory.JpaBuilders,
             org.apache.camel.builder.endpoint.dsl.JsltEndpointBuilderFactory.JsltBuilders,
+            org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory.JsonPatchBuilders,
             org.apache.camel.builder.endpoint.dsl.JsonValidatorEndpointBuilderFactory.JsonValidatorBuilders,
             org.apache.camel.builder.endpoint.dsl.JsonataEndpointBuilderFactory.JsonataBuilders,
             org.apache.camel.builder.endpoint.dsl.Jt400EndpointBuilderFactory.Jt400Builders,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 9ced0e8..a412685 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -191,6 +191,7 @@ public interface EndpointBuilders
             org.apache.camel.builder.endpoint.dsl.JooqEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.JpaEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.JsltEndpointBuilderFactory,
+            org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.JsonValidatorEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.JsonataEndpointBuilderFactory,
             org.apache.camel.builder.endpoint.dsl.Jt400EndpointBuilderFactory,
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 5fc86bf..f761195 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -8611,6 +8611,57 @@ public class StaticEndpointBuilders {
         return org.apache.camel.builder.endpoint.dsl.JsonataEndpointBuilderFactory.endpointBuilder(componentName, path);
     }
     /**
+     * JsonPatch (camel-json-patch)
+     * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+     * 
+     * Category: transformation
+     * Since: 3.12.0-SNAPSHOT
+     * Maven coordinates: org.apache.camel:camel-json-patch
+     * 
+     * Syntax: <code>json-patch:resourceUri</code>
+     * 
+     * Path parameter: resourceUri (required)
+     * Path to the resource. You can prefix with: classpath, file, http, ref, or
+     * bean. classpath, file and http loads the resource using these protocols
+     * (classpath is default). ref will lookup the resource in the registry.
+     * bean will call a method on a bean to be used as the resource. For bean
+     * you can specify the method name after dot, eg bean:myBean.myMethod.
+     * 
+     * @param path resourceUri
+     * @return the dsl builder
+     */
+    public static org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory.JsonPatchEndpointBuilder jsonPatch(
+            String path) {
+        return org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory.endpointBuilder("json-patch", path);
+    }
+    /**
+     * JsonPatch (camel-json-patch)
+     * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+     * 
+     * Category: transformation
+     * Since: 3.12.0-SNAPSHOT
+     * Maven coordinates: org.apache.camel:camel-json-patch
+     * 
+     * Syntax: <code>json-patch:resourceUri</code>
+     * 
+     * Path parameter: resourceUri (required)
+     * Path to the resource. You can prefix with: classpath, file, http, ref, or
+     * bean. classpath, file and http loads the resource using these protocols
+     * (classpath is default). ref will lookup the resource in the registry.
+     * bean will call a method on a bean to be used as the resource. For bean
+     * you can specify the method name after dot, eg bean:myBean.myMethod.
+     * 
+     * @param componentName to use a custom component name for the endpoint
+     * instead of the default name
+     * @param path resourceUri
+     * @return the dsl builder
+     */
+    public static org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory.JsonPatchEndpointBuilder jsonPatch(
+            String componentName,
+            String path) {
+        return org.apache.camel.builder.endpoint.dsl.JsonPatchEndpointBuilderFactory.endpointBuilder(componentName, path);
+    }
+    /**
      * JSON Schema Validator (camel-json-validator)
      * Validate JSON payloads using NetworkNT JSON Schema.
      * 
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JsonPatchEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JsonPatchEndpointBuilderFactory.java
new file mode 100644
index 0000000..ffdd0af
--- /dev/null
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JsonPatchEndpointBuilderFactory.java
@@ -0,0 +1,224 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import javax.annotation.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+ * 
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface JsonPatchEndpointBuilderFactory {
+
+
+    /**
+     * Builder for endpoint for the JsonPatch component.
+     */
+    public interface JsonPatchEndpointBuilder extends EndpointProducerBuilder {
+        /**
+         * Sets whether the context map should allow access to all details. By
+         * default only the message body and headers can be accessed. This
+         * option can be enabled for full access to the current Exchange and
+         * CamelContext. Doing so impose a potential security risk as this opens
+         * access to the full power of CamelContext API.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param allowContextMapAll the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder allowContextMapAll(
+                boolean allowContextMapAll) {
+            doSetProperty("allowContextMapAll", allowContextMapAll);
+            return this;
+        }
+        /**
+         * Sets whether the context map should allow access to all details. By
+         * default only the message body and headers can be accessed. This
+         * option can be enabled for full access to the current Exchange and
+         * CamelContext. Doing so impose a potential security risk as this opens
+         * access to the full power of CamelContext API.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param allowContextMapAll the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder allowContextMapAll(
+                String allowContextMapAll) {
+            doSetProperty("allowContextMapAll", allowContextMapAll);
+            return this;
+        }
+        /**
+         * Sets whether to use resource content cache or not.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param contentCache the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder contentCache(boolean contentCache) {
+            doSetProperty("contentCache", contentCache);
+            return this;
+        }
+        /**
+         * Sets whether to use resource content cache or not.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param contentCache the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder contentCache(String contentCache) {
+            doSetProperty("contentCache", contentCache);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing time
+         * of the processing.
+         * 
+         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param lazyStartProducer the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder lazyStartProducer(
+                boolean lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+        /**
+         * Whether the producer should be started lazy (on the first message).
+         * By starting lazy you can use this to allow CamelContext and routes to
+         * startup in situations where a producer may otherwise fail during
+         * starting and cause the route to fail being started. By deferring this
+         * startup to be lazy then the startup failure can be handled during
+         * routing messages via Camel's routing error handlers. Beware that when
+         * the first message is processed then creating and starting the
+         * producer may take a little time and prolong the total processing time
+         * of the processing.
+         * 
+         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
+         * type.
+         * 
+         * Default: false
+         * Group: producer
+         * 
+         * @param lazyStartProducer the value to set
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder lazyStartProducer(
+                String lazyStartProducer) {
+            doSetProperty("lazyStartProducer", lazyStartProducer);
+            return this;
+        }
+    }
+
+    public interface JsonPatchBuilders {
+        /**
+         * JsonPatch (camel-json-patch)
+         * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+         * 
+         * Category: transformation
+         * Since: 3.12.0-SNAPSHOT
+         * Maven coordinates: org.apache.camel:camel-json-patch
+         * 
+         * Syntax: <code>json-patch:resourceUri</code>
+         * 
+         * Path parameter: resourceUri (required)
+         * Path to the resource. You can prefix with: classpath, file, http,
+         * ref, or bean. classpath, file and http loads the resource using these
+         * protocols (classpath is default). ref will lookup the resource in the
+         * registry. bean will call a method on a bean to be used as the
+         * resource. For bean you can specify the method name after dot, eg
+         * bean:myBean.myMethod.
+         * 
+         * @param path resourceUri
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder jsonPatch(String path) {
+            return JsonPatchEndpointBuilderFactory.endpointBuilder("json-patch", path);
+        }
+        /**
+         * JsonPatch (camel-json-patch)
+         * JsonPatch component which transform JSON using JSON patch (RFC 6902).
+         * 
+         * Category: transformation
+         * Since: 3.12.0-SNAPSHOT
+         * Maven coordinates: org.apache.camel:camel-json-patch
+         * 
+         * Syntax: <code>json-patch:resourceUri</code>
+         * 
+         * Path parameter: resourceUri (required)
+         * Path to the resource. You can prefix with: classpath, file, http,
+         * ref, or bean. classpath, file and http loads the resource using these
+         * protocols (classpath is default). ref will lookup the resource in the
+         * registry. bean will call a method on a bean to be used as the
+         * resource. For bean you can specify the method name after dot, eg
+         * bean:myBean.myMethod.
+         * 
+         * @param componentName to use a custom component name for the endpoint
+         * instead of the default name
+         * @param path resourceUri
+         * @return the dsl builder
+         */
+        default JsonPatchEndpointBuilder jsonPatch(
+                String componentName,
+                String path) {
+            return JsonPatchEndpointBuilderFactory.endpointBuilder(componentName, path);
+        }
+    }
+    static JsonPatchEndpointBuilder endpointBuilder(
+            String componentName,
+            String path) {
+        class JsonPatchEndpointBuilderImpl extends AbstractEndpointBuilder implements JsonPatchEndpointBuilder {
+            public JsonPatchEndpointBuilderImpl(String path) {
+                super(componentName, path);
+            }
+        }
+        return new JsonPatchEndpointBuilderImpl(path);
+    }
+}
\ No newline at end of file
diff --git a/parent/pom.xml b/parent/pom.xml
index 0ccaa79..efd6af7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1781,6 +1781,11 @@
 			</dependency>
 			<dependency>
 				<groupId>org.apache.camel</groupId>
+				<artifactId>camel-json-patch</artifactId>
+				<version>${project.version}</version>
+			</dependency>
+			<dependency>
+				<groupId>org.apache.camel</groupId>
 				<artifactId>camel-json-validator</artifactId>
 				<version>${project.version}</version>
 			</dependency>