[ 
https://issues.apache.org/jira/browse/CAMEL-12032?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16265738#comment-16265738
 ] 

ASF GitHub Bot commented on CAMEL-12032:
----------------------------------------

onders86 closed pull request #2117: CAMEL-12032 - switch to 
https://github.com/networknt/json-schema-vali…
URL: https://github.com/apache/camel/pull/2117
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/components/camel-json-validator/pom.xml 
b/components/camel-json-validator/pom.xml
index 8d6f7741a46..bd4b17b49ce 100644
--- a/components/camel-json-validator/pom.xml
+++ b/components/camel-json-validator/pom.xml
@@ -26,7 +26,7 @@
 
   <artifactId>camel-json-validator</artifactId>
   <name>Camel :: JSON validator</name>
-  <description>Camel JSON Schema validation based on Everit JSON-schema 
library</description>
+  <description>Camel JSON Schema validation based on java-json-tools 
library</description>
   <packaging>jar</packaging>
 
   <properties>
@@ -36,23 +36,16 @@
     </camel.osgi.export.service>
   </properties>
 
-  <!-- everit is distributed in jitpack and not Maven central -->
-  <repositories>
-    <repository>
-      <id>jitpack.io</id>
-      <url>https://jitpack.io</url>
-    </repository>
-  </repositories>
-  <dependencies>
+    <dependencies>
 
     <dependency>
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-core</artifactId>
     </dependency>
     <dependency>
-      <groupId>com.github.everit-org.json-schema</groupId>
-      <artifactId>org.everit.json.schema</artifactId>
-      <version>${everit-org-json-schema-version}</version>
+      <groupId>com.github.fge</groupId>
+      <artifactId>json-schema-validator</artifactId>
+      <version>${java-json-schema-validator-version}</version>
     </dependency>
 
     <!-- for testing -->
diff --git 
a/components/camel-json-validator/src/main/docs/json-validator-component.adoc 
b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
index 5b00b1f5f98..6c072bae193 100644
--- 
a/components/camel-json-validator/src/main/docs/json-validator-component.adoc
+++ 
b/components/camel-json-validator/src/main/docs/json-validator-component.adoc
@@ -3,8 +3,8 @@
 *Available as of Camel version 2.20*
 
 The JSON Schema Validator component performs bean validation of the message 
body
-agains JSON Schemas using the Everit.org JSON Schema library
-(https://github.com/everit-org/json-schema). 
+agains JSON Schemas using Json Schema Validator library
+(https://github.com/java-json-tools/json-schema-validator). 
 
 Maven users will need to add the following dependency to their `pom.xml`
 for this component:
@@ -67,7 +67,7 @@ with the following path and query parameters:
 | *failOnNullHeader* (producer) | Whether to fail if no header exists when 
validating against a header. | true | boolean
 | *headerName* (producer) | To validate against a header instead of the 
message body. |  | String
 | *errorHandler* (advanced) | To use a custom ValidatorErrorHandler. The 
default error handler captures the errors and throws an exception. |  | 
JsonValidatorError Handler
-| *schemaLoader* (advanced) | To use a custom schema loader allowing for 
adding custom format validation. See Everit JSON Schema documentation. The 
default implementation will create a schema loader builder with draft v6 
support. |  | JsonSchemaLoader
+| *schemaLoader* (advanced) | To use a custom schema loader allowing for 
adding custom format validation. See json-schema-validator documentation. The 
default implementation will create a JsonSchema with JsonSchemaFactory's 
default |  | JsonSchemaLoader
 | *synchronous* (advanced) | Sets whether synchronous processing should be 
strictly used or Camel is allowed to use asynchronous processing (if 
supported). | false | boolean
 |===
 // endpoint options: END
@@ -124,4 +124,4 @@ we can validate incoming JSON with the following Camel 
route, where `myschema.js
 from("direct:start")
   .to("json-validator:myschema.json")
   .to("mock:end")
-----
\ No newline at end of file
+----
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonSchemaLoader.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonSchemaLoader.java
index 6746c10dbf4..e36bd5af323 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonSchemaLoader.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonSchemaLoader.java
@@ -18,23 +18,26 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.github.fge.jackson.JsonLoader;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.main.JsonSchema;
+import com.github.fge.jsonschema.main.JsonSchemaFactory;
 
 import org.apache.camel.CamelContext;
-import org.everit.json.schema.Schema;
-import org.everit.json.schema.loader.SchemaLoader;
-import org.everit.json.schema.loader.SchemaLoader.SchemaLoaderBuilder;
-import org.json.JSONObject;
-import org.json.JSONTokener;
 
 public class DefaultJsonSchemaLoader implements JsonSchemaLoader {
 
     @Override
-    public Schema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws IOException {
-        SchemaLoaderBuilder schemaLoaderBuilder = 
SchemaLoader.builder().draftV6Support();
-        try (InputStream inputStream = schemaInputStream) {
-            JSONObject rawSchema = new JSONObject(new 
JSONTokener(inputStream));
-            return 
schemaLoaderBuilder.schemaJson(rawSchema).build().load().build();
-        }
+    public JsonSchema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws ProcessingException, IOException {
+        JsonNode schemaNode = JsonLoader.fromReader(new 
InputStreamReader(schemaInputStream));
+        JsonSchemaFactory factory = JsonSchemaFactory.byDefault();
+        
+        JsonSchema schema = factory.getJsonSchema(schemaNode);
+        
+        return schema;
     }
 
 }
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonValidationErrorHandler.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonValidationErrorHandler.java
index da96a77dc64..ba890b2bbbe 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonValidationErrorHandler.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/DefaultJsonValidationErrorHandler.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.jsonvalidator;
 
+import com.github.fge.jsonschema.main.JsonSchema;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.ValidationException;
 
@@ -27,12 +29,8 @@ public void reset() {
     }
     
     @Override
-    public void handleErrors(Exchange exchange, org.everit.json.schema.Schema 
schema, Exception e) throws ValidationException {
-        if (e instanceof org.everit.json.schema.ValidationException) {
-            throw new JsonValidationException(exchange, schema, 
(org.everit.json.schema.ValidationException)e);
-        } else {
-            throw new JsonValidationException(exchange, schema, e);
-        }
+    public void handleErrors(Exchange exchange, JsonSchema schema, Exception 
e) throws ValidationException {
+        throw new JsonValidationException(exchange, schema, e);
     }
 
 }
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonSchemaLoader.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonSchemaLoader.java
index 045052df9a6..01e0240c098 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonSchemaLoader.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonSchemaLoader.java
@@ -17,18 +17,15 @@
 package org.apache.camel.component.jsonvalidator;
 
 import java.io.InputStream;
-
+import com.github.fge.jsonschema.main.JsonSchema;
 import org.apache.camel.CamelContext;
-import org.everit.json.schema.FormatValidator;
-import org.everit.json.schema.Schema;
-
 /**
  * Can be used to create custom schema for the JSON validator endpoint.
- * This interface is useful to add custom {@link FormatValidator} to the 
{@link Schema}
+ * This interface is useful to add custom {@link AbstractFormatAttribute} to 
the {@link JsonSchema}
  * 
  * For more information see 
- * <a 
href="https://github.com/everit-org/json-schema#format-validators";>Format 
Validators</a>
- * in the Everit JSON Schema documentation. 
+ * <a 
href="https://github.com/java-json-tools/json-schema-validator/blob/master/src/main/java/com/github/fge/jsonschema/format/AbstractFormatAttribute.java";>AbstractFormatAttribute</a>
+ * in json-schema-validator documentation. 
  */
 public interface JsonSchemaLoader {
     
@@ -39,6 +36,6 @@
      * @param schemaInputStream the resource input stream
      * @return a Schema to be used when validating incoming requests
      */
-    Schema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws Exception;
+    JsonSchema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws Exception;
 
 }
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
index d027f2e1d54..0eed44d64f4 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidationException.java
@@ -16,21 +16,21 @@
  */
 package org.apache.camel.component.jsonvalidator;
 
-import java.util.stream.Collectors;
+import com.github.fge.jsonschema.core.report.ProcessingReport;
+import com.github.fge.jsonschema.main.JsonSchema;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.ValidationException;
-import org.everit.json.schema.Schema;
 
 public class JsonValidationException extends ValidationException {
     
     private static final long serialVersionUID = 1L;
-    
-    public JsonValidationException(Exchange exchange, Schema schema, 
org.everit.json.schema.ValidationException e) {
-        super(e.getAllMessages().stream().collect(Collectors.joining(", ")), 
exchange, e);
-    }
 
-    public JsonValidationException(Exchange exchange, Schema schema, Exception 
e) {
+    public JsonValidationException(Exchange exchange, JsonSchema schema, 
Exception e) {
         super(e.getMessage(), exchange, e);
     }
+    
+    public JsonValidationException(Exchange exchange, JsonSchema schema, 
ProcessingReport report) {
+        super(" report: " + report, exchange, null);
+    }
 }
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
index 0b5cc8d8fd7..c4252a1cf47 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorEndpoint.java
@@ -17,6 +17,12 @@
 package org.apache.camel.component.jsonvalidator;
 
 import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import com.github.fge.jackson.JsonLoader;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.core.report.ProcessingReport;
+import com.github.fge.jsonschema.main.JsonSchema;
 
 import org.apache.camel.Component;
 import org.apache.camel.Exchange;
@@ -26,18 +32,12 @@
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.util.IOHelper;
-import org.everit.json.schema.ObjectSchema;
-import org.everit.json.schema.Schema;
-import org.everit.json.schema.ValidationException;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.json.JSONTokener;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Validates the payload of a message using Everit JSON schema validator.
+ * Validates the payload of a message using json-schema-validator.
  */
 @ManagedResource(description = "Managed JsonValidatorEndpoint")
 @UriEndpoint(scheme = "json-validator", firstVersion = "2.20.0", title = "JSON 
Schema Validator", syntax = "json-validator:resourceUri",
@@ -46,7 +46,7 @@
 
     private static final Logger LOG = 
LoggerFactory.getLogger(JsonValidatorEndpoint.class);
 
-    private volatile Schema schema;
+    private volatile JsonSchema schema;
 
     @UriParam(defaultValue = "true")
     private boolean failOnNullBody = true;
@@ -76,10 +76,9 @@ public ExchangePattern getExchangePattern() {
     
     @Override
     protected void onExchange(Exchange exchange) throws Exception {
-        Object jsonPayload;
         InputStream is = null;
         // Get a local copy of the current schema to improve concurrency.
-        Schema localSchema = this.schema;
+        JsonSchema localSchema = this.schema;
         if (localSchema == null) {
             localSchema = getOrCreateSchema();
         }
@@ -95,16 +94,14 @@ protected void onExchange(Exchange exchange) throws 
Exception {
                 }
             }
             if (is != null) {
-                if (schema instanceof ObjectSchema) {
-                    jsonPayload = new JSONObject(new JSONTokener(is));
-                } else { 
-                    jsonPayload = new JSONArray(new JSONTokener(is));
+                ProcessingReport report = 
schema.validate(JsonLoader.fromReader(new InputStreamReader(is)));
+                if (report.isSuccess()) { 
+                    LOG.debug("JSON is valid");
+                } else {
+                    throw new JsonValidationException(exchange, schema, 
report);
                 }
-                // throws a ValidationException if this object is invalid
-                schema.validate(jsonPayload); 
-                LOG.debug("JSON is valid");
             }
-        } catch (ValidationException | JSONException e) {
+        } catch (ProcessingException e) {
             this.errorHandler.handleErrors(exchange, schema, e);
         } finally {
             IOHelper.close(is);
@@ -128,7 +125,7 @@ private boolean shouldUseHeader() {
      * 
      * @return The currently loaded schema
      */
-    private Schema getOrCreateSchema() throws Exception {
+    private JsonSchema getOrCreateSchema() throws Exception {
         synchronized (this) {
             if (this.schema == null) {
                 this.schema = 
this.schemaLoader.createSchema(getCamelContext(), 
this.getResourceAsInputStream());
@@ -160,8 +157,8 @@ public JsonSchemaLoader getSchemaLoader() {
     }
     
     /**
-     * To use a custom schema loader allowing for adding custom format 
validation. See Everit JSON Schema documentation.
-     * The default implementation will create a schema loader builder with 
draft v6 support.
+     * To use a custom schema loader allowing for adding custom format 
validation. See json-schema-validator documentation.
+     * The default implementation will create a JsonSchema with 
JsonSchemaFactory's default
      */
     public void setSchemaLoader(JsonSchemaLoader schemaLoader) {
         this.schemaLoader = schemaLoader;
diff --git 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorErrorHandler.java
 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorErrorHandler.java
index 830ccd4f292..30f4ab2a9f3 100644
--- 
a/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorErrorHandler.java
+++ 
b/components/camel-json-validator/src/main/java/org/apache/camel/component/jsonvalidator/JsonValidatorErrorHandler.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.jsonvalidator;
 
+import com.github.fge.jsonschema.main.JsonSchema;
+
 import org.apache.camel.Exchange;
 import org.apache.camel.ValidationException;
 
@@ -34,6 +36,6 @@
      * @param e   the exception triggering the error
      * @throws ValidationException is thrown in case of validation errors
      */
-    void handleErrors(Exchange exchange, org.everit.json.schema.Schema schema, 
Exception e) throws ValidationException;
+    void handleErrors(Exchange exchange, JsonSchema schema, Exception e) 
throws ValidationException;
 
 }
diff --git 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/CustomSchemaLoaderValidatorRouteTest.java
 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/CustomSchemaLoaderValidatorRouteTest.java
index a509f8133d8..6df1fee5704 100644
--- 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/CustomSchemaLoaderValidatorRouteTest.java
+++ 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/CustomSchemaLoaderValidatorRouteTest.java
@@ -42,7 +42,7 @@ public void testValidMessage() throws Exception {
 
         template.sendBody("direct:start",
                 "{ \"name\": \"Even Joe\", \"id\": 1, \"price\": 12.5 }");
-
+        
         MockEndpoint.assertIsSatisfied(validEndpoint, invalidEndpoint, 
finallyEndpoint);
     }
 
diff --git 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/EvenCharNumValidator.java
 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/EvenCharNumValidator.java
index 6b995ac5878..c02a637ddbc 100644
--- 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/EvenCharNumValidator.java
+++ 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/EvenCharNumValidator.java
@@ -16,23 +16,31 @@
  */
 package org.apache.camel.component.jsonvalidator;
 
-import java.util.Optional;
+import com.github.fge.jackson.NodeType;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.core.report.ProcessingReport;
+import com.github.fge.jsonschema.format.AbstractFormatAttribute;
+import com.github.fge.jsonschema.format.FormatAttribute;
+import com.github.fge.jsonschema.processors.data.FullData;
+import com.github.fge.msgsimple.bundle.MessageBundle;
 
-import org.everit.json.schema.FormatValidator;
+public final class EvenCharNumValidator extends AbstractFormatAttribute {
+    
+    private static FormatAttribute instance = new EvenCharNumValidator();
 
-public class EvenCharNumValidator implements FormatValidator {
+    private EvenCharNumValidator() {
+        super("evenlength", NodeType.STRING);
+    }
 
-    @Override
-    public Optional<String> validate(final String subject) {
-        if (subject.length() % 2 == 0) {
-            return Optional.empty();
-        } else {
-            return Optional.of(String.format("the length of string [%s] is 
odd", subject));
-        }
+    public static FormatAttribute getInstance() {
+        return instance;
     }
 
     @Override
-    public String formatName() {
-        return "evenlength";
+    public void validate(ProcessingReport report, MessageBundle bundle, 
FullData data) throws ProcessingException {
+        final String value = data.getInstance().getNode().textValue();
+        if (value.length() % 2 != 0) {
+            report.error(newMsg(data, bundle, "oddlength").put("evenlength", 
value));
+        }
     }
 }
\ No newline at end of file
diff --git 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/TestCustomSchemaLoader.java
 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/TestCustomSchemaLoader.java
index b7367ebcb68..70becaa9357 100644
--- 
a/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/TestCustomSchemaLoader.java
+++ 
b/components/camel-json-validator/src/test/java/org/apache/camel/component/jsonvalidator/TestCustomSchemaLoader.java
@@ -18,25 +18,62 @@
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.github.fge.jackson.JsonLoader;
+import com.github.fge.jsonschema.cfg.ValidationConfiguration;
+import com.github.fge.jsonschema.core.exceptions.ProcessingException;
+import com.github.fge.jsonschema.library.DraftV4Library;
+import com.github.fge.jsonschema.library.Library;
+import com.github.fge.jsonschema.main.JsonSchema;
+import com.github.fge.jsonschema.main.JsonSchemaFactory;
+import com.github.fge.jsonschema.messages.JsonSchemaValidationBundle;
+import com.github.fge.msgsimple.bundle.MessageBundle;
+import com.github.fge.msgsimple.load.MessageBundles;
+import com.github.fge.msgsimple.source.MapMessageSource;
+import com.github.fge.msgsimple.source.MessageSource;
 
 import org.apache.camel.CamelContext;
-import org.everit.json.schema.Schema;
-import org.everit.json.schema.loader.SchemaLoader;
-import org.everit.json.schema.loader.SchemaLoader.SchemaLoaderBuilder;
-import org.json.JSONObject;
-import org.json.JSONTokener;
 
 public class TestCustomSchemaLoader implements JsonSchemaLoader {
 
     @Override
-    public Schema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws IOException {
+    public JsonSchema createSchema(CamelContext camelContext, InputStream 
schemaInputStream) throws IOException, ProcessingException {
+
+        JsonNode schemaNode = JsonLoader.fromReader(new 
InputStreamReader(schemaInputStream));
+        
+        /*
+         * Build a new library with our added format attribute
+         */
+        final Library library = DraftV4Library.get().thaw()
+            .addFormatAttribute("evenlength", 
EvenCharNumValidator.getInstance())
+            .freeze();
+
+        /*
+         * Build a new message bundle with our added error message
+         */
+        final String key = "evenlength";
+        final String value = "oddlength";
+        final MessageSource source = MapMessageSource.newBuilder()
+            .put(key, value).build();
+        final MessageBundle bundle
+            = MessageBundles.getBundle(JsonSchemaValidationBundle.class)
+            .thaw().appendSource(source).freeze();
+
+        /*
+         * Build our dedicated validation configuration
+         */
+        final ValidationConfiguration cfg = 
ValidationConfiguration.newBuilder()
+            .setDefaultLibrary("http://json-schema.org/draft-06/schema#";, 
library)
+            .setValidationMessages(bundle).freeze();
 
-        SchemaLoaderBuilder schemaLoaderBuilder = 
SchemaLoader.builder().draftV6Support();
+        final JsonSchemaFactory factory = JsonSchemaFactory.newBuilder()
+            .setValidationConfiguration(cfg).freeze();
 
-        try (InputStream inputStream = schemaInputStream) {
-            JSONObject rawSchema = new JSONObject(new 
JSONTokener(inputStream));
-            return 
schemaLoaderBuilder.schemaJson(rawSchema).addFormatValidator(new 
EvenCharNumValidator()).build().load().build();
-        }
+        final JsonSchema schema = factory.getJsonSchema(schemaNode);
+        
+        return schema;
     }
 
 }
diff --git a/parent/pom.xml b/parent/pom.xml
index 2d3110a4959..cfe024e6603 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -210,7 +210,7 @@
     <!-- embedmongo 1.50.2 do not work -->
     <embedmongo-version>1.50.1</embedmongo-version>
     <etcd4j-version>2.13.0</etcd4j-version>
-    <everit-org-json-schema-version>1.6.1</everit-org-json-schema-version>
+    
<java-json-schema-validator-version>2.2.6</java-json-schema-validator-version>
     <exec-maven-plugin-version>1.6.0</exec-maven-plugin-version>
     <ezmorph-bundle-version>1.0.6_1</ezmorph-bundle-version>
     <fabric8-maven-plugin-version>3.5.33</fabric8-maven-plugin-version>
diff --git a/platforms/karaf/features/src/main/resources/features.xml 
b/platforms/karaf/features/src/main/resources/features.xml
index 696a9411ed6..183ff8fd6b8 100644
--- a/platforms/karaf/features/src/main/resources/features.xml
+++ b/platforms/karaf/features/src/main/resources/features.xml
@@ -1249,7 +1249,7 @@
   </feature>
   <feature name='camel-json-validator' version='${project.version}' 
resolver='(obr)' start-level='50'>
     <feature version='${project.version}'>camel-core</feature>
-    <bundle 
dependency='true'>mvn:com.github.everit-org.json-schema/org.everit.json.schema/${everit-org-json-schema-version}</bundle>
+    <bundle 
dependency='true'>mvn:com.github.fge/json-schema-validator/${java-json-schema-validator-version}</bundle>
     <bundle dependency='true'>mvn:org.json/json/20170516</bundle>
     <bundle 
dependency='true'>mvn:com.damnhandy/handy-uri-templates/2.1.6</bundle>
     <bundle 
dependency='true'>mvn:joda-time/joda-time/${jodatime2-bundle-version}</bundle>
diff --git 
a/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml 
b/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
index 94e56c6b235..69e60df1d92 100644
--- 
a/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
+++ 
b/platforms/spring-boot/components-starter/camel-json-validator-starter/pom.xml
@@ -38,14 +38,6 @@
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-json-validator</artifactId>
       <version>${project.version}</version>
-      <!--START OF GENERATED CODE-->
-      <exclusions>
-        <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
-        </exclusion>
-      </exclusions>
-      <!--END OF GENERATED CODE-->
     </dependency>
     <!--START OF GENERATED CODE-->
     <dependency>
@@ -58,12 +50,4 @@
     </dependency>
     <!--END OF GENERATED CODE-->
   </dependencies>
-  <!--START OF GENERATED CODE-->
-  <repositories>
-    <repository>
-      <id>jitpack.io</id>
-      <url>https://jitpack.io</url>
-    </repository>
-  </repositories>
-  <!--END OF GENERATED CODE-->
 </project>
diff --git 
a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/jsonvalidator/springboot/JsonValidatorComponentConfiguration.java
 
b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/jsonvalidator/springboot/JsonValidatorComponentConfiguration.java
index 6a65e34b141..7be84ebe12a 100644
--- 
a/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/jsonvalidator/springboot/JsonValidatorComponentConfiguration.java
+++ 
b/platforms/spring-boot/components-starter/camel-json-validator-starter/src/main/java/org/apache/camel/component/jsonvalidator/springboot/JsonValidatorComponentConfiguration.java
@@ -21,7 +21,7 @@
 import org.springframework.boot.context.properties.ConfigurationProperties;
 
 /**
- * Validates the payload of a message using Everit JSON schema validator.
+ * Validates the payload of a message using json-schema-validator.
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> camel-json-validator - Switch to a different validator
> ------------------------------------------------------
>
>                 Key: CAMEL-12032
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12032
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Claus Ibsen
>            Assignee: Önder Sezgin
>             Fix For: 2.21.0
>
>
> We should use
> https://github.com/networknt/json-schema-validator
> As its better for Apache Camel and its also released to maven central.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to