You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2024/01/24 15:33:25 UTC

(camel) branch main updated: CAMEL-20353: Fix rest-openapi 3.1 test for requestValidationWithJsonBodyAndMissingMandatoryFields

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

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


The following commit(s) were added to refs/heads/main by this push:
     new d11ee01d854 CAMEL-20353: Fix rest-openapi 3.1 test for requestValidationWithJsonBodyAndMissingMandatoryFields
d11ee01d854 is described below

commit d11ee01d85485f1ba3d3237130eb4fb763bdfc3b
Author: James Netherton <ja...@gmail.com>
AuthorDate: Wed Jan 24 14:53:12 2024 +0000

    CAMEL-20353: Fix rest-openapi 3.1 test for requestValidationWithJsonBodyAndMissingMandatoryFields
---
 .../component/rest/openapi/RestOpenApiRequestValidationTest.java      | 2 --
 components/camel-rest-openapi/src/test/resources/petstore-3.1.yaml    | 4 ----
 2 files changed, 6 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 bbfa211a098..369ead0a0ca 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
@@ -49,7 +49,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;
@@ -216,7 +215,6 @@ public class RestOpenApiRequestValidationTest extends CamelTestSupport {
         assertEquals(10, createdPet.getId());
     }
 
-    @Disabled("Disabled due to CAMEL-20353")
     @ParameterizedTest
     @MethodSource("petStoreVersions")
     void requestValidationWithJsonBodyAndMissingMandatoryFields(String petStoreVersion) {
diff --git a/components/camel-rest-openapi/src/test/resources/petstore-3.1.yaml b/components/camel-rest-openapi/src/test/resources/petstore-3.1.yaml
index 5b0a8d25d86..9fe7c9a8bb4 100644
--- a/components/camel-rest-openapi/src/test/resources/petstore-3.1.yaml
+++ b/components/camel-rest-openapi/src/test/resources/petstore-3.1.yaml
@@ -111,15 +111,11 @@ paths:
               $ref: '#/components/schemas/Pet'
               writeOnly: true
               description: A Pet in JSON Format
-              required:
-                - id
           application/xml:
             schema:
               $ref: '#/components/schemas/Pet'
               writeOnly: true
               description: A Pet in XML Format
-              required:
-                - id
           application/x-www-form-urlencoded:
             schema:
               $ref: '#/components/schemas/Pet'