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

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


The following commit(s) were added to refs/heads/val-to by this push:
     new 721654f8523 CAMEL-20623: camel-rest-openapi - Use same client 
validation as in rest-dsl for producer. Avoid using Atlassian JAR which is not 
jakarta ee compatible and is causing pain and classloading issues.
721654f8523 is described below

commit 721654f85238f6593698011a22417c1b473c448a
Author: Claus Ibsen <[email protected]>
AuthorDate: Sat Mar 30 11:43:09 2024 +0100

    CAMEL-20623: camel-rest-openapi - Use same client validation as in rest-dsl 
for producer. Avoid using Atlassian JAR which is not jakarta ee compatible and 
is causing pain and classloading issues.
---
 .../openapi/RestOpenApiRequestValidationTest.java  | 29 ----------------------
 1 file changed, 29 deletions(-)

diff --git 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiRequestValidationTest.java
 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiRequestValidationTest.java
index c0cb21956b0..35c6f11857f 100644
--- 
a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiRequestValidationTest.java
+++ 
b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiRequestValidationTest.java
@@ -24,7 +24,6 @@ import java.io.IOException;
 import java.net.HttpURLConnection;
 import java.nio.file.Files;
 import java.nio.file.Paths;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
@@ -48,7 +47,6 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.MethodSource;
 import org.junit.jupiter.params.provider.ValueSource;
@@ -371,33 +369,6 @@ public class RestOpenApiRequestValidationTest extends 
CamelTestSupport {
         assertEquals("Fruit deleted", result);
     }
 
-    @ParameterizedTest
-    @MethodSource("fruitsApiVersions")
-    @Disabled
-    void requestValidationRequiredFormParamsNotPresent(String 
fruitsApiVersion) {
-        Exchange exchange = template.request("direct:formParam", new 
Processor() {
-            @Override
-            public void process(Exchange exchange) throws Exception {
-                exchange.getMessage().setHeader("fruitsApiVersion", 
fruitsApiVersion);
-                exchange.getMessage().setBody("name=&color=");
-            }
-        });
-
-        Exception exception = exchange.getException();
-        assertNotNull(exception);
-        assertInstanceOf(RestOpenApiValidationException.class, exception);
-
-        RestOpenApiValidationException validationException = 
(RestOpenApiValidationException) exception;
-        Set<String> errors = validationException.getValidationErrors();
-        // [Path '/name'] Instance type (null) does not match any allowed 
primitive type string
-        assertEquals(2, errors.size());
-        Iterator<String> iterator = errors.iterator();
-        assertEquals("[Path '/color'] Instance type (null) does not match any 
allowed primitive type (allowed: [\"string\"])",
-                iterator.next());
-        assertEquals("[Path '/name'] Instance type (null) does not match any 
allowed primitive type (allowed: [\"string\"])",
-                iterator.next());
-    }
-
     @ParameterizedTest
     @MethodSource("fruitsApiVersions")
     void requestValidationRequiredFormParamsPresent(String fruitsApiVersion) {

Reply via email to