You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/02/29 09:37:09 UTC

(camel) branch openapi3 created (now f234dae17fa)

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

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


      at f234dae17fa CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

This branch includes the following new commits:

     new a294023f343 CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
     new a8676718736 CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
     new ecb8c495732 CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
     new bdb5b01004a CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
     new 493c1e5d4ba CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
     new f234dae17fa CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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



(camel) 05/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit 493c1e5d4babc0c172c796559257ce664a6b93fe
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 10:19:26 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 .../org/apache/camel/catalog/components/rest-openapi.json  |  2 +-
 .../src/main/java/org/apache/camel/openapi/BeanConfig.java |  2 +-
 .../apache/camel/component/rest/openapi/rest-openapi.json  |  2 +-
 .../camel/component/rest/openapi/RestOpenApiEndpoint.java  |  9 ++++-----
 .../camel/component/rest/openapi/RestOpenApiProducer.java  | 14 ++++++++++----
 .../camel/builder/component/ComponentsBuilderFactory.java  |  3 +--
 .../component/dsl/RestOpenapiComponentBuilderFactory.java  |  6 ++----
 .../src/generated/resources/metadata.json                  |  2 +-
 .../endpoint/dsl/RestOpenApiEndpointBuilderFactory.java    |  2 +-
 9 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
index ef8b4fcc110..3393cc929be 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
@@ -39,7 +39,7 @@
   "properties": {
     "specificationUri": { "index": 0, "kind": "path", "displayName": "Specification Uri", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "openapi.json", "description": "Path to the OpenApi specification file. The scheme, host base path are taken from this specification, but these can be overridden with properties on the component or endpoint level. If not  [...]
     "operationId": { "index": 1, "kind": "path", "displayName": "Operation Id", "group": "producer", "label": "producer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of the operation from the OpenApi specification." },
-    "basePath": { "index": 2, "kind": "parameter", "displayName": "Base Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "API basePath, for example \/v2. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration." },
+    "basePath": { "index": 2, "kind": "parameter", "displayName": "Base Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "API basePath, for example \/v3. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration." },
     "componentName": { "index": 3, "kind": "parameter", "displayName": "Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the Camel component that will perform the requests. The component must be present in Camel registry and it must implement RestProducerFactory service provider interface. If not set CLASSPATH is searched for sin [...]
     "consumes": { "index": 4, "kind": "parameter", "displayName": "Consumes", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "What payload type this component capable of consuming. Could be one type, like application\/json or multiple types as application\/json, application\/xml; q=0.5 according to the RFC7231. This equates to the value of Accept HTTP h [...]
     "host": { "index": 5, "kind": "parameter", "displayName": "Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Scheme hostname and port to direct the HTTP requests to in the form of https:\/\/hostname:port. Can be configured at the endpoint, component or in the corresponding REST configuration in the Camel Context. If you give this component a na [...]
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/BeanConfig.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/BeanConfig.java
index be00b572c8b..2198c683e43 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/BeanConfig.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/BeanConfig.java
@@ -32,7 +32,7 @@ public class BeanConfig {
 
     String[] schemes;
     String title;
-    Version version = new Version("3.0.1");
+    Version version = OPENAPI_VERSION_30;
     String licenseUrl;
     String license;
 
diff --git a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
index ef8b4fcc110..3393cc929be 100644
--- a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
+++ b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
@@ -39,7 +39,7 @@
   "properties": {
     "specificationUri": { "index": 0, "kind": "path", "displayName": "Specification Uri", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.net.URI", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "openapi.json", "description": "Path to the OpenApi specification file. The scheme, host base path are taken from this specification, but these can be overridden with properties on the component or endpoint level. If not  [...]
     "operationId": { "index": 1, "kind": "path", "displayName": "Operation Id", "group": "producer", "label": "producer", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "ID of the operation from the OpenApi specification." },
-    "basePath": { "index": 2, "kind": "parameter", "displayName": "Base Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "API basePath, for example \/v2. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration." },
+    "basePath": { "index": 2, "kind": "parameter", "displayName": "Base Path", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "API basePath, for example \/v3. Default is unset, if set overrides the value present in OpenApi specification and in the component configuration." },
     "componentName": { "index": 3, "kind": "parameter", "displayName": "Component Name", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Name of the Camel component that will perform the requests. The component must be present in Camel registry and it must implement RestProducerFactory service provider interface. If not set CLASSPATH is searched for sin [...]
     "consumes": { "index": 4, "kind": "parameter", "displayName": "Consumes", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "What payload type this component capable of consuming. Could be one type, like application\/json or multiple types as application\/json, application\/xml; q=0.5 according to the RFC7231. This equates to the value of Accept HTTP h [...]
     "host": { "index": 5, "kind": "parameter", "displayName": "Host", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Scheme hostname and port to direct the HTTP requests to in the form of https:\/\/hostname:port. Can be configured at the endpoint, component or in the corresponding REST configuration in the Camel Context. If you give this component a na [...]
diff --git a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
index b121f6712d5..f7916a278d5 100644
--- a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
+++ b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
@@ -72,6 +72,7 @@ import org.apache.camel.spi.UriPath;
 import org.apache.camel.support.CamelContextHelper;
 import org.apache.camel.support.DefaultEndpoint;
 import org.apache.camel.support.ResourceHelper;
+import org.apache.camel.util.FileUtil;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.UnsafeUriCharactersEncoder;
@@ -100,8 +101,7 @@ public final class RestOpenApiEndpoint extends DefaultEndpoint {
      */
     Map<String, Object> parameters = Collections.emptyMap();
 
-    @UriParam(
-              description = "API basePath, for example \"`/v2`\". Default is unset, if set overrides the value present in"
+    @UriParam(description = "API basePath, for example \"`/v3`\". Default is unset, if set overrides the value present in"
                             + " OpenApi specification and in the component configuration.",
               defaultValue = "", label = "producer")
     private String basePath;
@@ -113,8 +113,7 @@ public final class RestOpenApiEndpoint extends DefaultEndpoint {
               label = "producer")
     private String componentName;
 
-    @UriParam(
-              description = "What payload type this component capable of consuming. Could be one type, like `application/json`"
+    @UriParam(description = "What payload type this component capable of consuming. Could be one type, like `application/json`"
                             + " or multiple types as `application/json, application/xml; q=0.5` according to the RFC7231. This equates"
                             + " to the value of `Accept` HTTP header. If set overrides any value found in the OpenApi specification and."
                             + " in the component configuration",
@@ -828,7 +827,7 @@ public final class RestOpenApiEndpoint extends DefaultEndpoint {
                     "The given OpenApi specification could not be loaded from `" + uri + "`.", e);
         } finally {
             if (tmpFileToDelete != null) {
-                tmpFileToDelete.delete();
+                FileUtil.deleteFile(tmpFileToDelete);
             }
         }
 
diff --git a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProducer.java b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProducer.java
index 40d6e7208d4..647cd5986f5 100644
--- a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProducer.java
+++ b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiProducer.java
@@ -46,10 +46,16 @@ public class RestOpenApiProducer extends DelegateAsyncProcessor implements Async
         }
 
         if (requestValidator != null) {
-            Set<String> validationErrors = requestValidator.validate(exchange);
-            if (!validationErrors.isEmpty()) {
-                RestOpenApiValidationException exception = new RestOpenApiValidationException(validationErrors);
-                exchange.setException(exception);
+            try {
+                Set<String> validationErrors = requestValidator.validate(exchange);
+                if (!validationErrors.isEmpty()) {
+                    RestOpenApiValidationException exception = new RestOpenApiValidationException(validationErrors);
+                    exchange.setException(exception);
+                    callback.done(true);
+                    return true;
+                }
+            } catch (Exception e) {
+                exchange.setException(e);
                 callback.done(true);
                 return true;
             }
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index a5ad77f680d..cdb54a68559 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -3497,8 +3497,7 @@ public interface ComponentsBuilderFactory {
     }
     /**
      * REST OpenApi (camel-rest-openapi)
-     * Configure REST producers based on an OpenAPI specification document
-     * delegating to a component implementing the RestProducerFactory interface.
+     * To call REST services using OpenAPI specification as contract.
      * 
      * Category: rest,api
      * Since: 3.1
diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
index bba0bf4e7b9..710861be507 100644
--- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
+++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/RestOpenapiComponentBuilderFactory.java
@@ -23,8 +23,7 @@ import org.apache.camel.builder.component.ComponentBuilder;
 import org.apache.camel.component.rest.openapi.RestOpenApiComponent;
 
 /**
- * Configure REST producers based on an OpenAPI specification document
- * delegating to a component implementing the RestProducerFactory interface.
+ * To call REST services using OpenAPI specification as contract.
  * 
  * Generated by camel-package-maven-plugin - do not edit this file!
  */
@@ -33,8 +32,7 @@ public interface RestOpenapiComponentBuilderFactory {
 
     /**
      * REST OpenApi (camel-rest-openapi)
-     * Configure REST producers based on an OpenAPI specification document
-     * delegating to a component implementing the RestProducerFactory interface.
+     * To call REST services using OpenAPI specification as contract.
      * 
      * Category: rest,api
      * Since: 3.1
diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json
index 1c04c4eef87..b49d9f0b998 100644
--- a/dsl/camel-componentdsl/src/generated/resources/metadata.json
+++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json
@@ -6016,7 +6016,7 @@
     "kind": "component",
     "name": "rest-openapi",
     "title": "REST OpenApi",
-    "description": "Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.",
+    "description": "To call REST services using OpenAPI specification as contract.",
     "deprecated": false,
     "firstVersion": "3.1.0",
     "label": "rest,api",
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
index d3568ea1644..4a64b8a2b84 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
@@ -45,7 +45,7 @@ public interface RestOpenApiEndpointBuilderFactory {
             return (AdvancedRestOpenApiEndpointBuilder) this;
         }
         /**
-         * API basePath, for example /v2. Default is unset, if set overrides the
+         * API basePath, for example /v3. Default is unset, if set overrides the
          * value present in OpenApi specification and in the component
          * configuration.
          * 


(camel) 01/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit a294023f343972c0b48342618921dfcd091f12df
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 09:19:29 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 components/camel-openapi-java/pom.xml              |   80 +-
 .../src/main/docs/openapi-java.adoc                |    2 +-
 .../java/org/apache/camel/openapi/OpenAPI3to2.java |  603 ----------
 .../camel/openapi/OpenApiRestProducerFactory.java  |    4 +-
 .../apache/camel/openapi/RestOpenApiReader.java    |    4 +-
 .../apache/camel/openapi/RestOpenApiSupport.java   |    8 +-
 .../org/apache/camel/openapi/ComplexTypesTest.java |    4 -
 .../openapi/OpenApiRestProducerFactoryTest.java    |    7 -
 .../RestOpenApiDefaultProducesConsumesTest.java    |    2 +-
 .../camel/openapi/RestOpenApiLicenseInfoTest.java  |    2 +-
 ...estOpenApiModelApiSecurityRequirementsTest.java |   29 -
 .../RestOpenApiReaderApiDocsOverrideTest.java      |    2 +-
 .../openapi/RestOpenApiReaderApiDocsTest.java      |    2 +-
 .../openapi/RestOpenApiReaderContextPathTest.java  |   38 -
 .../openapi/RestOpenApiReaderDayOfWeekTest.java    |   11 +-
 .../openapi/RestOpenApiReaderDisabledTest.java     |   37 -
 ...RestOpenApiReaderEnableVendorExtensionTest.java |   11 +-
 .../RestOpenApiReaderFileResponseModelTest.java    |   10 +-
 .../RestOpenApiReaderModelApiSecurityTest.java     |   40 -
 .../RestOpenApiReaderModelBookOrderTest.java       |   33 -
 .../camel/openapi/RestOpenApiReaderModelTest.java  |   33 -
 .../RestOpenApiReaderPropertyPlaceholderTest.java  |    9 +-
 .../camel/openapi/RestOpenApiReaderTest.java       |   59 -
 .../openapi/RestOpenApiV2SecuritySchemesTest.java  |   96 --
 .../openapi/RestOpenApiV3SecuritySchemesTest.java  |   64 +-
 ...pringRestOpenApiReaderModelApiSecurityTest.java |   41 -
 .../src/test/resources/hello-api.json              |    9 +-
 .../openapi/V20SchemaForComplexTypesRequest.json   |  158 ---
 ...ForComplexTypesRequestWithSchemaAnnotation.json |  158 ---
 .../openapi/V20SchemaForComplexTypesResponse.json  |  101 --
 ...orComplexTypesResponseWithSchemaAnnotation.json |  101 --
 .../src/test/resources/petstore-v3.json            | 1226 +++++++++++++++++++-
 .../src/test/resources/petstore.json               |    1 -
 components/camel-rest-openapi/pom.xml              |   31 +-
 dsl/camel-jbang/camel-jbang-core/pom.xml           |   31 +-
 35 files changed, 1386 insertions(+), 1661 deletions(-)

diff --git a/components/camel-openapi-java/pom.xml b/components/camel-openapi-java/pom.xml
index 62ee5f5231e..64fd4e1785b 100644
--- a/components/camel-openapi-java/pom.xml
+++ b/components/camel-openapi-java/pom.xml
@@ -35,8 +35,6 @@
     <properties>
         <firstVersion>3.1.0</firstVersion>
         <label>rest,api</label>
-
-
         <camel.surefire.parallel>true</camel.surefire.parallel>
     </properties>
 
@@ -56,57 +54,89 @@
             <artifactId>camel-tooling-util</artifactId>
         </dependency>
 
+        <!-- openapi -->
+        <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-core-jakarta</artifactId>
+            <version>${swagger-openapi3-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-models-jakarta</artifactId>
+            <version>${swagger-openapi3-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.parser.v3</groupId>
+            <artifactId>swagger-parser</artifactId>
+            <version>${swagger-openapi3-java-parser-version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.parser.v3</groupId>
+                    <artifactId>swagger-parser-v2-converter</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
         <!-- json -->
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-annotations</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.datatype</groupId>
             <artifactId>jackson-datatype-joda</artifactId>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.dataformat</groupId>
             <artifactId>jackson-dataformat-yaml</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.jakarta.rs</groupId>
-            <artifactId>jackson-jakarta-rs-json-provider</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-models</artifactId>
-            <version>${swagger-openapi3-version}</version>
-        </dependency>
-        <dependency>
-            <groupId>io.swagger.parser.v3</groupId>
-            <artifactId>swagger-parser</artifactId>
-            <version>${swagger-openapi3-java-parser-version}</version>
             <exclusions>
                 <exclusion>
                     <groupId>io.swagger.core.v3</groupId>
-                <artifactId>swagger-core</artifactId>
+                    <artifactId>*</artifactId>
                 </exclusion>
-            </exclusions>        
+            </exclusions>
         </dependency>
-
         <dependency>
-            <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-core-jakarta</artifactId>
-            <version>${swagger-openapi3-version}</version>
+            <groupId>com.fasterxml.jackson.jakarta.rs</groupId>
+            <artifactId>jackson-jakarta-rs-json-provider</artifactId>
             <exclusions>
                 <exclusion>
                     <groupId>io.swagger.core.v3</groupId>
-                <artifactId>swagger-models-jakarta</artifactId>
+                    <artifactId>*</artifactId>
                 </exclusion>
-            </exclusions>  
+            </exclusions>
         </dependency>
 
-
         <!-- servlet api -->
         <dependency>
             <groupId>jakarta.servlet</groupId>
diff --git a/components/camel-openapi-java/src/main/docs/openapi-java.adoc b/components/camel-openapi-java/src/main/docs/openapi-java.adoc
index 1400c76fbe5..bfe1a7e9a49 100644
--- a/components/camel-openapi-java/src/main/docs/openapi-java.adoc
+++ b/components/camel-openapi-java/src/main/docs/openapi-java.adoc
@@ -86,7 +86,7 @@ with `api.xxx` is configured using `apiProperty` dsl.
 browser, and not the actual access to the REST services. The default is
 false.
 
-|openapi.version |String |OpenApi spec version. Is default 3.0.
+|openapi.version |String |OpenApi spec version. Only spec version 3.x is supported. Is default 3.0.
 
 |host |String |To set up the hostname. If not configured, camel-openapi-java will
 calculate the name as localhost based.
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenAPI3to2.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenAPI3to2.java
deleted file mode 100644
index e096b6c34e1..00000000000
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenAPI3to2.java
+++ /dev/null
@@ -1,603 +0,0 @@
-/*
- * 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.openapi;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.Base64;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.stream.Collectors;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import io.swagger.models.ArrayModel;
-import io.swagger.models.Contact;
-import io.swagger.models.Info;
-import io.swagger.models.License;
-import io.swagger.models.Model;
-import io.swagger.models.ModelImpl;
-import io.swagger.models.Operation;
-import io.swagger.models.Path;
-import io.swagger.models.RefModel;
-import io.swagger.models.Response;
-import io.swagger.models.Scheme;
-import io.swagger.models.Swagger;
-import io.swagger.models.Tag;
-import io.swagger.models.auth.ApiKeyAuthDefinition;
-import io.swagger.models.auth.BasicAuthDefinition;
-import io.swagger.models.auth.In;
-import io.swagger.models.auth.OAuth2Definition;
-import io.swagger.models.auth.SecuritySchemeDefinition;
-import io.swagger.models.parameters.AbstractSerializableParameter;
-import io.swagger.models.parameters.BodyParameter;
-import io.swagger.models.parameters.CookieParameter;
-import io.swagger.models.parameters.HeaderParameter;
-import io.swagger.models.parameters.Parameter;
-import io.swagger.models.parameters.PathParameter;
-import io.swagger.models.parameters.QueryParameter;
-import io.swagger.models.properties.IntegerProperty;
-import io.swagger.models.properties.Property;
-import io.swagger.models.properties.PropertyBuilder;
-import io.swagger.models.properties.RefProperty;
-import io.swagger.models.properties.StringProperty;
-import io.swagger.util.Json;
-import io.swagger.util.Yaml;
-import io.swagger.v3.oas.models.OpenAPI;
-import io.swagger.v3.oas.models.PathItem;
-import io.swagger.v3.oas.models.Paths;
-import io.swagger.v3.oas.models.examples.Example;
-import io.swagger.v3.oas.models.headers.Header;
-import io.swagger.v3.oas.models.media.ArraySchema;
-import io.swagger.v3.oas.models.media.BinarySchema;
-import io.swagger.v3.oas.models.media.ByteArraySchema;
-import io.swagger.v3.oas.models.media.DateSchema;
-import io.swagger.v3.oas.models.media.DateTimeSchema;
-import io.swagger.v3.oas.models.media.FileSchema;
-import io.swagger.v3.oas.models.media.IntegerSchema;
-import io.swagger.v3.oas.models.media.MapSchema;
-import io.swagger.v3.oas.models.media.MediaType;
-import io.swagger.v3.oas.models.media.NumberSchema;
-import io.swagger.v3.oas.models.media.PasswordSchema;
-import io.swagger.v3.oas.models.media.Schema;
-import io.swagger.v3.oas.models.media.StringSchema;
-import io.swagger.v3.oas.models.parameters.Parameter.StyleEnum;
-import io.swagger.v3.oas.models.parameters.RequestBody;
-import io.swagger.v3.oas.models.responses.ApiResponse;
-import io.swagger.v3.oas.models.security.OAuthFlows;
-import io.swagger.v3.oas.models.security.Scopes;
-import io.swagger.v3.oas.models.security.SecurityRequirement;
-import io.swagger.v3.oas.models.security.SecurityScheme;
-import io.swagger.v3.oas.models.servers.Server;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class OpenAPI3to2 {
-
-    private Swagger openApi2;
-    private Logger log = LoggerFactory.getLogger(getClass());
-
-    public void convertOpenAPI3to2(OpenAPI openApi3) {
-        openApi2 = new Swagger()
-                .info(convertInfo(openApi3.getInfo()))
-                .tags(getTags(openApi3.getTags()))
-                .paths(getPaths(openApi3.getPaths()));
-        setServerInfo(openApi2, openApi3.getServers());
-        if (openApi3.getComponents() != null && openApi3.getComponents().getSchemas() != null) {
-            for (Map.Entry<String, Schema> entry : openApi3.getComponents().getSchemas().entrySet()) {
-                openApi2.addDefinition(entry.getKey(), convertSchema(entry.getValue()));
-            }
-        }
-        if (openApi3.getComponents() != null && openApi3.getComponents().getSecuritySchemes() != null) {
-            convertSecurityDefinitions(openApi3.getComponents().getSecuritySchemes());
-        }
-        if (openApi3.getSecurity() != null) {
-            for (SecurityRequirement sr : openApi3.getSecurity()) {
-                openApi2.addSecurity(convertSecurityRequirement(sr));
-            }
-        }
-    }
-
-    private io.swagger.models.SecurityRequirement convertSecurityRequirement(SecurityRequirement sr) {
-        io.swagger.models.SecurityRequirement sreq = new io.swagger.models.SecurityRequirement();
-        for (Map.Entry<String, List<String>> reqMap : sr.entrySet()) {
-            sreq.requirement(reqMap.getKey(), reqMap.getValue());
-        }
-        return sreq;
-    }
-
-    private void convertSecurityDefinitions(Map<String, SecurityScheme> securitySchemes) {
-        for (Map.Entry<String, SecurityScheme> entry : securitySchemes.entrySet()) {
-            openApi2.addSecurityDefinition(entry.getKey(), convertSecurityScheme(entry.getValue()));
-        }
-    }
-
-    private SecuritySchemeDefinition convertSecurityScheme(SecurityScheme securityScheme) {
-        SecuritySchemeDefinition swaggerScheme = null;
-        switch (securityScheme.getType()) {
-            case HTTP:
-                if ("basic".equals(securityScheme.getScheme())) {
-                    swaggerScheme = new BasicAuthDefinition();
-                } else {
-                    throw new IllegalStateException("OpenAPI 2.0 does not support bearer token security schemes.");
-                }
-                break;
-            case APIKEY:
-                if (securityScheme.getIn() == SecurityScheme.In.COOKIE) {
-                    throw new IllegalStateException("Invalid 'in' value for API Key security scheme");
-                } else {
-                    swaggerScheme
-                            = new ApiKeyAuthDefinition(securityScheme.getName(), In.forValue(securityScheme.getIn().name()));
-                }
-                break;
-            case OAUTH2:
-                OAuth2Definition oauth2 = new OAuth2Definition();
-                OAuthFlows flows = securityScheme.getFlows();
-                Scopes scopes = null;
-                if (flows.getImplicit() != null) {
-                    oauth2.implicit(flows.getImplicit().getAuthorizationUrl());
-                    scopes = flows.getImplicit().getScopes();
-                } else if (flows.getPassword() != null) {
-                    oauth2.password(flows.getPassword().getTokenUrl());
-                    scopes = flows.getPassword().getScopes();
-                } else if (flows.getClientCredentials() != null) {
-                    oauth2.application(flows.getClientCredentials().getTokenUrl());
-                    scopes = flows.getClientCredentials().getScopes();
-                } else if (flows.getAuthorizationCode() != null) {
-                    oauth2.accessCode(flows.getAuthorizationCode().getAuthorizationUrl(),
-                            flows.getAuthorizationCode().getTokenUrl());
-                    scopes = flows.getAuthorizationCode().getScopes();
-                } else {
-                    // TODO: handle other
-                }
-                if (scopes != null) {
-                    for (Map.Entry<String, String> entry : scopes.entrySet()) {
-                        oauth2.addScope(entry.getKey(), entry.getValue());
-                    }
-                }
-
-                swaggerScheme = oauth2;
-                break;
-            default:
-                throw new IllegalStateException(
-                        "Security scheme " + securityScheme.getType().toString()
-                                                + "is not supported in OpenAPI 2");
-        }
-        if (swaggerScheme != null && securityScheme.getDescription() != null) {
-            swaggerScheme.setDescription(securityScheme.getDescription());
-        }
-        return swaggerScheme;
-    }
-
-    private void setServerInfo(Swagger openApi2, List<Server> servers) {
-        // set host, basePath & schemas
-        for (Server server : servers) {
-            String serverUrl = server.getUrl();
-            if (serverUrl != null && !serverUrl.isEmpty()) {
-                try {
-                    URL url = new URL(serverUrl);
-                    openApi2.setHost(url.getHost() + ":" + url.getPort());
-                    openApi2.setBasePath(url.getPath());
-                    Scheme scheme = Scheme.forValue(url.getProtocol());
-                    if (scheme != null) {
-                        openApi2.addScheme(scheme);
-                    }
-                } catch (MalformedURLException e) {
-                    log.warn("Malformed URL in configuration: {}", serverUrl);
-                    int basePathIndex = serverUrl.lastIndexOf('/');
-                    if (basePathIndex > 0) {
-                        openApi2.setBasePath(serverUrl.substring(basePathIndex));
-                    } else {
-                        basePathIndex = serverUrl.length() - 1;
-                    }
-                    int protIndex = serverUrl.indexOf("://");
-                    if (protIndex > 0) {
-                        String protocol = serverUrl.substring(0, protIndex);
-                        Scheme scheme = Scheme.forValue(protocol);
-                        if (scheme != null) {
-                            openApi2.addScheme(scheme);
-                        }
-                        openApi2.setHost(serverUrl.substring(protIndex + 3, basePathIndex));
-                    } else {
-                        openApi2.setHost(serverUrl.substring(0, basePathIndex));
-                    }
-                }
-            }
-        }
-
-    }
-
-    public byte[] getSwaggerAsJson() {
-        ObjectMapper mapper = Json.mapper();
-        mapper.enable(SerializationFeature.INDENT_OUTPUT);
-        //        mapper.setSerializationInclusion(.Include.NON_NULL);
-        try {
-            return mapper.writeValueAsBytes(openApi2);
-        } catch (JsonProcessingException e) {
-            // TODO Auto-generated catch block
-            return new byte[0];
-        }
-    }
-
-    public byte[] getSwaggerAsYaml() {
-        ObjectMapper mapper = Json.mapper();
-        try {
-            JsonNode node = mapper.readTree(getSwaggerAsJson());
-            return Yaml.mapper().writerWithDefaultPrettyPrinter().writeValueAsBytes(node);
-        } catch (IOException e) {
-            // TODO Auto-generated catch block
-            return new byte[0];
-        }
-    }
-
-    private Map<String, Path> getPaths(Paths paths) {
-        Map<String, Path> swaggerPaths = new java.util.HashMap<>();
-        for (Map.Entry<String, PathItem> pathItem : paths.entrySet()) {
-            swaggerPaths.put(pathItem.getKey(), convertPathItem(pathItem.getValue()));
-        }
-        return swaggerPaths;
-    }
-
-    private Path convertPathItem(PathItem pathItem) {
-        Path path = new Path();
-        for (Map.Entry<PathItem.HttpMethod, io.swagger.v3.oas.models.Operation> op : pathItem.readOperationsMap().entrySet()) {
-            path.set(op.getKey().name().toLowerCase(), convertOperation(op.getValue()));
-        }
-        return path;
-    }
-
-    private Operation convertOperation(io.swagger.v3.oas.models.Operation openApiOp) {
-        Operation swaggerOp = new Operation().operationId(openApiOp.getOperationId());
-        if (openApiOp.getTags() != null) {
-            swaggerOp.setTags(openApiOp.getTags());
-        }
-        if (openApiOp.getExtensions() != null) {
-            swaggerOp.setVendorExtensions(openApiOp.getExtensions());
-        }
-        swaggerOp.setSummary(openApiOp.getSummary());
-        swaggerOp.setDeprecated(openApiOp.getDeprecated());
-        if (openApiOp.getSecurity() != null) {
-            for (SecurityRequirement srs : openApiOp.getSecurity()) {
-                for (Map.Entry<String, List<String>> sr : srs.entrySet()) {
-                    swaggerOp.addSecurity(sr.getKey(), sr.getValue());
-                }
-            }
-        }
-        if (openApiOp.getParameters() != null) {
-            for (io.swagger.v3.oas.models.parameters.Parameter param : openApiOp.getParameters()) {
-                swaggerOp.addParameter(convertParameter(param));
-            }
-        }
-        if (openApiOp.getRequestBody() != null) {
-            swaggerOp.addParameter(convertRequestBodyToParameter(openApiOp.getRequestBody()));
-            swaggerOp.setConsumes(getConsumers(openApiOp.getRequestBody()));
-        }
-        if (openApiOp.getResponses() != null) {
-            for (Entry<String, ApiResponse> resp : openApiOp.getResponses().entrySet()) {
-                swaggerOp.addResponse(resp.getKey(), convertResponse(resp.getValue()));
-            }
-            swaggerOp.setProduces(getProducers(openApiOp.getResponses().values()));
-        }
-
-        return swaggerOp;
-    }
-
-    private List<String> getProducers(Collection<ApiResponse> apiResponses) {
-        List<String> producers = new java.util.ArrayList<>();
-        for (ApiResponse response : apiResponses) {
-            if (response.getContent() != null) {
-                producers.addAll(response.getContent().keySet());
-            }
-        }
-        return producers;
-    }
-
-    private Response convertResponse(ApiResponse apiResponse) {
-        Response response = new Response().description(apiResponse.getDescription());
-        Map<String, Object> examples = new java.util.HashMap<>();
-        if (apiResponse.getContent() != null) {
-            for (MediaType contentType : apiResponse.getContent().values()) {
-                if (contentType.getSchema() != null) {
-                    response.setResponseSchema(convertSchema(contentType.getSchema()));
-                    if (contentType.getExamples() != null) {
-                        for (Map.Entry<String, Example> ex : contentType.getExamples().entrySet()) {
-                            examples.put(ex.getKey(), ex.getValue().getValue());
-                        }
-                    }
-                    break;
-                }
-            }
-        }
-        if (!examples.isEmpty()) {
-            response.setExamples(examples);
-        }
-        if (apiResponse.getHeaders() != null) {
-            for (Map.Entry<String, Header> hdr : apiResponse.getHeaders().entrySet()) {
-                Property headerProp = convertHeaderToProperty(hdr.getValue());
-                if (headerProp != null) {
-                    response.addHeader(hdr.getKey(), headerProp);
-                }
-            }
-        }
-        return response;
-    }
-
-    private Property convertHeaderToProperty(Header header) {
-        if (header.getSchema() != null) {
-            Property headerProp = convertSchemaToProperty(header.getSchema());
-            if (header.getDescription() != null) {
-                headerProp.setDescription(header.getDescription());
-            }
-            return headerProp;
-        } else {
-            log.warn("Missing schema for Header {}", header);
-            return null;
-        }
-    }
-
-    private List<String> getConsumers(RequestBody requestBody) {
-        // set consumes for the op to all keys of contentTypes
-        if (requestBody.getContent() != null) {
-            return new java.util.ArrayList<>(requestBody.getContent().keySet());
-        } else {
-            return Collections.emptyList();
-        }
-    }
-
-    private Parameter convertRequestBodyToParameter(RequestBody requestBody) {
-        BodyParameter bodyParam = new BodyParameter().name("body");
-        if (requestBody.getRequired()) {
-            bodyParam.setRequired(requestBody.getRequired());
-        }
-        if (requestBody.getDescription() != null && !requestBody.getDescription().isEmpty()) {
-            bodyParam.setDescription(requestBody.getDescription());
-        }
-        if (requestBody.getContent() != null) {
-            for (MediaType contentType : requestBody.getContent().values()) {
-                if (contentType.getSchema() != null) {
-                    bodyParam.setSchema(convertSchema(contentType.getSchema()));
-                    break;
-                }
-            }
-            for (Entry<String, MediaType> contentType : requestBody.getContent().entrySet()) {
-                if (contentType.getValue().getExample() != null) {
-                    bodyParam.addExample(contentType.getKey(), contentType.getValue().getExample().toString());
-                }
-            }
-
-        }
-        return bodyParam;
-    }
-
-    private Model convertSchema(Schema schema) {
-        Model model = null;
-        if (schema instanceof FileSchema) {
-            // Special case
-            return new ModelImpl().type("file");
-        }
-        if (schema.get$ref() != null) {
-            return new RefModel(convertRef(schema.get$ref()));
-        } else if (schema.getItems() != null) {
-            model = new ArrayModel().items(convertSchemaToProperty(schema.getItems()));
-        } else {
-            model = new ModelImpl().type(schema.getType()).format(schema.getFormat());
-            //           model = new ModelImpl().type(schema.getType());
-        }
-        if (schema.getProperties() != null) {
-            model.setProperties(convertPropertiesMap(schema.getProperties()));
-        }
-        if (schema.getRequired() != null && model instanceof ModelImpl) {
-            for (Object req : schema.getRequired()) {
-                ((ModelImpl) model).addRequired(req.toString());
-            }
-        }
-        if (schema.getDescription() != null && !schema.getDescription().isEmpty()) {
-            model.setDescription(schema.getDescription());
-        }
-        if (schema.getExtensions() != null) {
-            ((ModelImpl) model).setVendorExtensions(schema.getExtensions());
-        }
-        return model;
-    }
-
-    private Map<String, Property> convertPropertiesMap(Map properties) {
-        Map<String, Property> swaggerProps = new java.util.HashMap<>(properties.size());
-        for (Map.Entry<String, Schema> propEntry : ((Map<String, Schema>) properties).entrySet()) {
-            swaggerProps.put(propEntry.getKey(), convertSchemaToProperty(propEntry.getValue()));
-        }
-        return swaggerProps;
-    }
-
-    private String convertRef(String schemaRef) {
-        return schemaRef.replace("#/components/schemas", "#/definitions");
-    }
-
-    private Parameter convertParameter(io.swagger.v3.oas.models.parameters.Parameter param) {
-        switch (param.getIn()) {
-            case "path":
-                return initParam(new PathParameter(), param);
-            case "query":
-                return initParam(new QueryParameter(), param);
-            case "cookie":
-                return initParam(new CookieParameter(), param);
-            case "header":
-                return initParam(new HeaderParameter(), param);
-            default: // should not happen
-                return null;
-        }
-    }
-
-    private Parameter initParam(
-            AbstractSerializableParameter swaggerParam, io.swagger.v3.oas.models.parameters.Parameter param) {
-        swaggerParam.name(param.getName()).required(param.getRequired());
-        if (param.getDescription() != null) {
-            swaggerParam.setDescription(param.getDescription());
-        }
-        if (param.getStyle() != null) {
-            swaggerParam.setCollectionFormat(convertStyleToCollectionFormat(param.getStyle()));
-        }
-        if (param.getSchema() != null) {
-            swaggerParam.setType(param.getSchema().getType());
-            swaggerParam.setFormat(param.getSchema().getFormat());
-            if (param.getSchema().getDefault() != null) {
-                swaggerParam.setDefault(param.getSchema().getDefault());
-            }
-            if (param.getSchema().getItems() != null) {
-                // Convert items schema to swagger items property
-                swaggerParam.setItems(convertSchemaToProperty(param.getSchema().getItems()));
-            }
-            if (param.getSchema().getEnum() != null) {
-                // Convert enums (ATTENTION, maybe not strings?)
-                List<String> enums
-                        = ((List<?>) param.getSchema().getEnum()).stream().map(v -> {
-                            if (v instanceof byte[]) {
-                                return new String(Base64.getEncoder().encode((byte[]) v));
-                            } else if (v instanceof Date) {
-                                return RestOpenApiSupport.DEFAULT_DATE_FORMAT.format(v);
-                            } else {
-                                return v.toString();
-                            }
-                        }).collect(Collectors.toList());
-                swaggerParam.setEnum(enums);
-            }
-        }
-        if (param.getExample() != null) {
-            swaggerParam.setExample(param.getExample().toString());
-        } else if (param.getExamples() != null && !param.getExamples().isEmpty()) {
-            swaggerParam.setExample(param.getExamples().values().iterator().next().getValue().toString());
-        }
-
-        return swaggerParam;
-    }
-
-    private String convertStyleToCollectionFormat(StyleEnum style) {
-        switch (style) {
-            case FORM:
-                return "csv";
-            case SPACEDELIMITED:
-                return "ssv";
-            case PIPEDELIMITED:
-                return "pipes";
-            case DEEPOBJECT:
-                return "multi";
-            default:
-                return "csv";
-        }
-    }
-
-    private Property convertSchemaToProperty(Schema schema) {
-        if (schema.get$ref() != null) {
-            return new RefProperty(convertRef(schema.get$ref()));
-        }
-        if (schema instanceof IntegerSchema) {
-            IntegerProperty prop = new IntegerProperty();
-            prop.setFormat(schema.getFormat());
-            return prop;
-        } else if (schema instanceof NumberSchema) {
-            if ("float".equals(schema.getFormat())) {
-                return new io.swagger.models.properties.FloatProperty();
-            } else if ("double".equals(schema.getFormat())) {
-                return new io.swagger.models.properties.DoubleProperty();
-            } else if ("int64".equals(schema.getFormat())) {
-                return new io.swagger.models.properties.LongProperty();
-            } else {
-                return new io.swagger.models.properties.BaseIntegerProperty(schema.getFormat());
-            }
-        } else if (schema instanceof ByteArraySchema) {
-            return new io.swagger.models.properties.ByteArrayProperty();
-        } else if (schema instanceof BinarySchema) {
-            return new io.swagger.models.properties.BinaryProperty();
-        } else if (schema instanceof DateSchema) {
-            return new io.swagger.models.properties.DateProperty();
-        } else if (schema instanceof DateTimeSchema) {
-            return new io.swagger.models.properties.DateTimeProperty();
-        } else if (schema instanceof PasswordSchema) {
-            return new io.swagger.models.properties.PasswordProperty();
-        } else if (schema instanceof FileSchema) {
-            return new io.swagger.models.properties.FileProperty();
-        } else if (schema instanceof StringSchema) {
-            StringProperty prop = new StringProperty(schema.getFormat());
-            if (schema.getEnum() != null) {
-                prop.setEnum(schema.getEnum());
-            }
-            return prop;
-        } else if (schema instanceof ArraySchema) {
-            return new io.swagger.models.properties.ArrayProperty(convertSchemaToProperty(schema.getItems()));
-        } else if (schema instanceof MapSchema) {
-            if (schema.getAdditionalProperties() != null && schema.getAdditionalProperties() instanceof Schema) {
-                return new io.swagger.models.properties.MapProperty(
-                        convertSchemaToProperty((Schema) schema.getAdditionalProperties()));
-            }
-            if (schema.getAdditionalItems() != null) {
-                return new io.swagger.models.properties.MapProperty(convertSchemaToProperty(schema.getAdditionalItems()));
-            } else {
-                return new io.swagger.models.properties.MapProperty(); // should not happen?
-            }
-        } else {
-            // ???
-            return PropertyBuilder.build(schema.getType(), schema.getFormat(), null);
-        }
-    }
-
-    private List<Tag> getTags(List<io.swagger.v3.oas.models.tags.Tag> tags) {
-        if (tags != null) {
-            List<Tag> swaggerTags = new java.util.ArrayList<>(tags.size());
-            for (io.swagger.v3.oas.models.tags.Tag tag : tags) {
-                swaggerTags.add(new Tag().name(tag.getName()).description(tag.getDescription()));
-            }
-            return swaggerTags;
-        }
-        return null;
-    }
-
-    private Info convertInfo(io.swagger.v3.oas.models.info.Info info) {
-        if (info != null) {
-            return new Info().description(info.getDescription())
-                    .title(info.getTitle())
-                    .termsOfService(info.getTermsOfService())
-                    .version(info.getVersion())
-                    .contact(convertContact(info.getContact()))
-                    .license(convertLicense(info.getLicense()));
-        } else {
-            return null;
-        }
-    }
-
-    private License convertLicense(io.swagger.v3.oas.models.info.License license) {
-        if (license != null) {
-            return new License().name(license.getName()).url(license.getUrl());
-        } else {
-            return null;
-        }
-    }
-
-    private Contact convertContact(io.swagger.v3.oas.models.info.Contact contact) {
-        if (contact != null) {
-            return new Contact().name(contact.getName()).email(contact.getEmail()).url(contact.getUrl());
-        } else {
-            return null;
-        }
-    }
-
-}
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java
index ce4d9ecafac..f03ae5c0273 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/OpenApiRestProducerFactory.java
@@ -19,12 +19,12 @@ package org.apache.camel.openapi;
 import java.util.Map;
 import java.util.StringJoiner;
 
-import io.swagger.parser.OpenAPIParser;
 import io.swagger.v3.oas.models.OpenAPI;
 import io.swagger.v3.oas.models.Operation;
 import io.swagger.v3.oas.models.PathItem;
 import io.swagger.v3.oas.models.parameters.Parameter;
 import io.swagger.v3.oas.models.responses.ApiResponse;
+import io.swagger.v3.parser.OpenAPIV3Parser;
 import io.swagger.v3.parser.core.models.SwaggerParseResult;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Producer;
@@ -86,7 +86,7 @@ public class OpenApiRestProducerFactory implements RestProducerFactory {
     }
 
     OpenAPI loadOpenApiModel(String apiDoc) throws Exception {
-        final OpenAPIParser openApiParser = new OpenAPIParser();
+        final OpenAPIV3Parser openApiParser = new OpenAPIV3Parser();
         final SwaggerParseResult openApi = openApiParser.readLocation(apiDoc, null, null);
 
         if (openApi != null && openApi.getOpenAPI() != null) {
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
index 49753a4de42..a93d328dea4 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java
@@ -179,9 +179,7 @@ public class RestOpenApiReader {
 
     private void checkCompatOpenApi2(OpenAPI openApi, BeanConfig config) {
         if (config.isOpenApi2()) {
-            // Verify that the OpenAPI 3 model can be downgraded to OpenApi 2
-            OpenAPI3to2 converter = new OpenAPI3to2();
-            converter.convertOpenAPI3to2(openApi);
+            throw new IllegalArgumentException("OpenAPI 2.x is not supported");
         }
     }
 
diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
index 1046adff07d..ef2a47ccc37 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
@@ -336,13 +336,7 @@ public class RestOpenApiSupport {
 
     public static <T extends Object> T getFromOpenAPI(OpenAPI openApi, BeanConfig config, Class<T> type, boolean json) {
         if (config.isOpenApi2()) {
-            OpenAPI3to2 converter = new OpenAPI3to2();
-            converter.convertOpenAPI3to2(openApi);
-            byte[] bytes = converter.getSwaggerAsJson();
-            if (type.equals(String.class)) {
-                return type.cast(new String(bytes, StandardCharsets.UTF_8));
-            }
-            return type.cast(bytes);
+            throw new IllegalArgumentException("OpenAPI 2.x is not supported");
         } else {
             ObjectMapper mapper = json ? config.isOpenApi31() ? Json31.mapper() : Json.mapper()
                     : config.isOpenApi31() ? Yaml31.mapper() : Yaml.mapper();
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java
index ddecb2e8c81..b39ebeaa8d5 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/ComplexTypesTest.java
@@ -141,16 +141,12 @@ public class ComplexTypesTest extends CamelTestSupport {
 
     static Stream<Arguments> uriAndVersionVariations() {
         return Stream.of(
-                arguments("/complexRequest", "2.0"),
                 arguments("/complexRequest", "3.0"),
                 arguments("/complexRequest", "3.1"),
-                arguments("/complexResponse", "2.0"),
                 arguments("/complexResponse", "3.0"),
                 arguments("/complexResponse", "3.1"),
-                arguments("/complexRequestWithSchemaAnnotation", "2.0"),
                 arguments("/complexRequestWithSchemaAnnotation", "3.0"),
                 arguments("/complexRequestWithSchemaAnnotation", "3.1"),
-                arguments("/complexResponseWithSchemaAnnotation", "2.0"),
                 arguments("/complexResponseWithSchemaAnnotation", "3.0"),
                 arguments("/complexResponseWithSchemaAnnotation", "3.1"));
     }
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
index dfefbbd0a5f..cb0d648ae2e 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
@@ -22,13 +22,6 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class OpenApiRestProducerFactoryTest {
 
-    @Test
-    public void shouldLoadOpenApiPetStoreModel() throws Exception {
-        OpenApiRestProducerFactory factory = new OpenApiRestProducerFactory();
-
-        assertNotNull(factory.loadOpenApiModel("petstore.json"));
-    }
-
     @Test
     public void shouldLoadOpenApiPetStoreModelV3() throws Exception {
         OpenApiRestProducerFactory factory = new OpenApiRestProducerFactory();
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiDefaultProducesConsumesTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiDefaultProducesConsumesTest.java
index e1848f15e56..9b4a8b547ff 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiDefaultProducesConsumesTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiDefaultProducesConsumesTest.java
@@ -40,7 +40,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class RestOpenApiDefaultProducesConsumesTest {
 
     private static final ObjectMapper MAPPER = new ObjectMapper();
-    private static final String[] OPENAPI_VERSIONS = { "3.1", "3.0", "2.0" };
+    private static final String[] OPENAPI_VERSIONS = { "3.1", "3.0" };
     private final Logger log = LoggerFactory.getLogger(getClass());
 
     @ParameterizedTest
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java
index 530eefc6510..51493db6f17 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiLicenseInfoTest.java
@@ -31,7 +31,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 public class RestOpenApiLicenseInfoTest {
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testLicenseInfo(String openApiVersion) throws Exception {
         CamelContext context = new DefaultCamelContext();
         context.addRoutes(new RouteBuilder() {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiModelApiSecurityRequirementsTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiModelApiSecurityRequirementsTest.java
index d4ff6b60dce..4cd80fd47f0 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiModelApiSecurityRequirementsTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiModelApiSecurityRequirementsTest.java
@@ -20,7 +20,6 @@ import io.swagger.v3.oas.models.OpenAPI;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -52,34 +51,6 @@ public class RestOpenApiModelApiSecurityRequirementsTest extends CamelTestSuppor
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-        log.info(json);
-
-        assertTrue(json.contains("\"securityDefinitions\" : {"));
-        assertTrue(json.contains("\"type\" : \"oauth2\""));
-        assertTrue(json.contains("\"authorizationUrl\" : \"https://petstore.swagger.io/oauth/dialog\""));
-        assertTrue(json.contains("\"flow\" : \"implicit\""));
-        assertTrue(json.contains("\"type\" : \"apiKey\","));
-        assertTrue(json.contains("\"security\" : [ {"));
-        assertTrue(json.contains("\"petstore_auth\" : [ \"read\", \"write\" ]"));
-        assertTrue(json.contains("\"api_key\" : [ ]"));
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
index 68e4c3cadb2..d76c698b5d9 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
@@ -58,7 +58,7 @@ public class RestOpenApiReaderApiDocsOverrideTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderRead(String version) throws Exception {
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
index 95d2963ebb7..72a8396a272 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
@@ -58,7 +58,7 @@ public class RestOpenApiReaderApiDocsTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderRead(String version) throws Exception {
         BeanConfig config = getBeanConfig();
         config.setVersion(version);
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderContextPathTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderContextPathTest.java
index 36fdb3c7f65..dcf09a8d8d0 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderContextPathTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderContextPathTest.java
@@ -23,7 +23,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -63,43 +62,6 @@ public class RestOpenApiReaderContextPathTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setInfo(new Info());
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"basePath\" : \"/api\""));
-        assertTrue(json.contains("\"/hello/bye\""));
-        assertTrue(json.contains("\"summary\" : \"To update the greeting message\""));
-        assertTrue(json.contains("\"/hello/bye/{name}\""));
-        assertFalse(json.contains("\"/api/hello/bye/{name}\""));
-        assertTrue(json.contains("\"/hello/hi/{name}\""));
-        assertFalse(json.contains("\"/api/hello/hi/{name}\""));
-        assertTrue(json.contains("\"type\" : \"number\""));
-        assertTrue(json.contains("\"format\" : \"float\""));
-        assertTrue(json.contains("\"application/xml\" : \"<hello>Hi</hello>\""));
-        assertTrue(json.contains("\"x-example\" : \"Donald Duck\""));
-        assertTrue(json.contains("\"success\" : \"123\""));
-        assertTrue(json.contains("\"error\" : \"-1\""));
-        assertTrue(json.contains("\"type\" : \"array\""));
-
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
index de31da98064..d098681626d 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
@@ -57,7 +57,7 @@ public class RestOpenApiReaderDayOfWeekTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderRead(String version) throws Exception {
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
@@ -76,13 +76,8 @@ public class RestOpenApiReaderDayOfWeekTest extends CamelTestSupport {
         String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
         log.info(json);
 
-        if (config.isOpenApi2()) {
-            assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-            assertTrue(json.contains("\"$ref\" : \"#/definitions/DayResponse\""));
-        } else {
-            assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
-            assertTrue(json.contains("\"$ref\" : \"#/components/schemas/DayResponse\""));
-        }
+        assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
+        assertTrue(json.contains("\"$ref\" : \"#/components/schemas/DayResponse\""));
         assertTrue(json.contains("\"default\" : \"friday\""));
         assertTrue(json.contains("\"enum\" : [ \"monday\", \"tuesday\", \"wednesday\", \"thursday\", \"friday\" ]"));
         assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.DayResponse\""));
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDisabledTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDisabledTest.java
index 05ec77811c5..b02adf6d8da 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDisabledTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDisabledTest.java
@@ -23,7 +23,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -63,42 +62,6 @@ public class RestOpenApiReaderDisabledTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setInfo(new Info());
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-        log.info(json);
-
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"basePath\" : \"/api\""));
-        assertFalse(json.contains("\"/hello/bye\""));
-        assertFalse(json.contains("\"summary\" : \"To update the greeting message\""));
-        assertFalse(json.contains("\"/hello/bye/{name}\""));
-        assertFalse(json.contains("\"/api/hello/bye/{name}\""));
-        assertTrue(json.contains("\"/hello/hi/{name}\""));
-        assertFalse(json.contains("\"/api/hello/hi/{name}\""));
-        assertFalse(json.contains("\"type\" : \"number\""));
-        assertFalse(json.contains("\"format\" : \"float\""));
-        assertFalse(json.contains("\"application/xml\" : \"<hello>Hi</hello>\""));
-        assertTrue(json.contains("\"x-example\" : \"Donald Duck\""));
-        assertFalse(json.contains("\"success\" : \"123\""));
-        assertFalse(json.contains("\"error\" : \"-1\""));
-        assertTrue(json.contains("\"type\" : \"array\""));
-
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
index 9aeeef616b3..29ef371069b 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
@@ -70,7 +70,7 @@ public class RestOpenApiReaderEnableVendorExtensionTest extends CamelTestSupport
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testEnableVendorExtension(String version) throws Exception {
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
@@ -91,13 +91,8 @@ public class RestOpenApiReaderEnableVendorExtensionTest extends CamelTestSupport
 
         String camelId = context.getName();
 
-        if (config.isOpenApi2()) {
-            assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-            assertTrue(json.contains("\"$ref\" : \"#/definitions/User\""));
-        } else {
-            assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
-            assertTrue(json.contains("\"$ref\" : \"#/components/schemas/User\""));
-        }
+        assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
+        assertTrue(json.contains("\"$ref\" : \"#/components/schemas/User\""));
         assertTrue(json.contains("\"description\" : \"The user returned\""));
         assertFalse(json.contains("\"enum\""));
         assertTrue(json.contains("\"x-camelContextId\" : \"" + camelId + "\""));
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderFileResponseModelTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderFileResponseModelTest.java
index fd80fb62cd7..fb868d90953 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderFileResponseModelTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderFileResponseModelTest.java
@@ -51,7 +51,7 @@ public class RestOpenApiReaderFileResponseModelTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderRead(String version) throws Exception {
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
@@ -68,12 +68,8 @@ public class RestOpenApiReaderFileResponseModelTest extends CamelTestSupport {
         String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
         LOG.info(json);
 
-        if (config.isOpenApi2()) {
-            assertTrue(json.contains("\"type\" : \"file\""));
-        } else {
-            assertTrue(json.contains("\"format\" : \"binary\""));
-            assertTrue(json.contains("\"type\" : \"string\""));
-        }
+        assertTrue(json.contains("\"format\" : \"binary\""));
+        assertTrue(json.contains("\"type\" : \"string\""));
 
         context.stop();
     }
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
index a0015aea829..49ab693a256 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -75,45 +74,6 @@ public class RestOpenApiReaderModelApiSecurityTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        assertTrue(json.contains("\"securityDefinitions\" : {"));
-        assertTrue(json.contains("\"type\" : \"oauth2\""));
-        assertTrue(json.contains("\"authorizationUrl\" : \"http://petstore.swagger.io/oauth/dialog\""));
-        assertTrue(json.contains("\"flow\" : \"implicit\""));
-        assertTrue(json.contains("\"type\" : \"apiKey\","));
-        assertTrue(json.contains("\"in\" : \"header\""));
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"security\" : [ {"));
-        assertTrue(json.contains("\"petstore_auth\" : [ \"write:pets\", \"read:pets\" ]"));
-        assertTrue(json.contains("\"api_key\" : [ ]"));
-        assertTrue(json.contains("\"description\" : \"The user returned\""));
-        assertTrue(json.contains("\"$ref\" : \"#/definitions/User\""));
-        assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.User\""));
-        assertTrue(json.contains("\"type\" : \"string\""));
-        assertTrue(json.contains("\"format\" : \"date\""));
-        assertFalse(json.contains("\"enum\""));
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
index 4c3ef3bf376..6bda7819b24 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -70,38 +69,6 @@ public class RestOpenApiReaderModelBookOrderTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"description\" : \"The order returned\""));
-        assertTrue(json.contains("\"BookOrder\""));
-        assertTrue(json.contains("\"LineItem\""));
-        assertTrue(json.contains("\"$ref\" : \"#/definitions/BookOrder\""));
-        assertTrue(json.contains("\"$ref\" : \"#/definitions/LineItem\""));
-        assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.BookOrder\""));
-        assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.LineItem\""));
-
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
index 9d316574076..8549856aaf0 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
@@ -22,7 +22,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -68,38 +67,6 @@ public class RestOpenApiReaderModelTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setVersion("2.0");
-        config.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"description\" : \"The user returned\""));
-        assertTrue(json.contains("\"$ref\" : \"#/definitions/User\""));
-        assertFalse(json.contains("\"$ref\" : \"#/definitions/org.apache.camel.openapi.User\""));
-        assertTrue(json.contains("\"x-className\""));
-        assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.User\""));
-        assertTrue(json.contains("\"type\" : \"string\""));
-        assertTrue(json.contains("\"format\" : \"date\""));
-        assertFalse(json.contains("\"enum\""));
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
index 6f37c5717bd..a737eeedfbf 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
@@ -79,7 +79,7 @@ public class RestOpenApiReaderPropertyPlaceholderTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "3.1", "3.0", "2.0" })
+    @ValueSource(strings = { "3.1", "3.0" })
     public void testReaderRead(String version) throws Exception {
         BeanConfig config = new BeanConfig();
         config.setHost("localhost:8080");
@@ -97,12 +97,7 @@ public class RestOpenApiReaderPropertyPlaceholderTest extends CamelTestSupport {
         String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
         log.info(json);
 
-        if (config.isOpenApi2()) {
-            assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-            assertTrue(json.contains("\"basePath\" : \"/api\""));
-        } else {
-            assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
-        }
+        assertTrue(json.contains("\"url\" : \"http://localhost:8080/api\""));
         assertTrue(json.contains("\"/hello/bye\""));
         assertTrue(json.contains("\"summary\" : \"To update the greeting message\""));
         assertTrue(json.contains("\"/hello/bye/{name}\""));
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
index a59cc9da3e3..6416ab51f45 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
@@ -23,7 +23,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
@@ -216,64 +215,6 @@ public class RestOpenApiReaderTest extends CamelTestSupport {
         };
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setInfo(new Info());
-        config.setVersion("2.0");
-
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-        String flatJson = json.replace("\n", " ").replaceAll("\\s+", " ");
-
-        log.info(json);
-
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"basePath\" : \"/api\""));
-        assertTrue(json.contains("\"/hello/bye\""));
-        assertTrue(json.contains("\"summary\" : \"To update the greeting message\""));
-        assertTrue(json.contains("\"/hello/bye/{name}\""));
-        assertTrue(json.contains("\"/hello/hi/{name}\""));
-        assertTrue(json.contains("\"type\" : \"number\""));
-        assertTrue(json.contains("\"format\" : \"float\""));
-        assertTrue(json.contains("\"application/xml\" : \"<hello>Hi</hello>\""));
-        assertTrue(json.contains("\"x-example\" : \"Donald Duck\""));
-        assertTrue(json.contains("\"success\" : \"123\""));
-        assertTrue(json.contains("\"error\" : \"-1\""));
-        assertTrue(json.contains("\"type\" : \"array\""));
-        assertTrue(json.contains("\"enum\" : [ \"A\", \"B\", \"C\" ]"));
-        assertTrue(json.contains("\"enum\" : [ 1, 2, 3 ]"));
-        assertTrue(json.contains("\"enum\" : [ 1.0, 2.0, 3.0 ]"));
-        assertTrue(json.contains("\"enum\" : [ \"true\", \"false\" ]"));
-        assertTrue(json.contains("\"enum\" : [ \"MQ==\", \"Mg==\", \"Mw==\" ]"));
-        assertTrue(json.contains("\"enum\" : [ \"2023-01-01\", \"2023-02-02\", \"2023-03-03\" ]"));
-        assertTrue(json.contains("\"enum\" : [ \"2011-12-03T10:15:30+01:00\" ]"));
-        assertTrue(json.contains("\"enum\" : [ \"foo\", \"bar\", \"cheese\" ]"));
-
-        flatJson = flatJson.replaceAll("\"operationId\" : \"[^\\\"]*\", ", "").replaceAll("\"summary\" : \"[^\\\"]*\", ", "");
-        log.info(flatJson);
-        assertTrue(flatJson.contains(
-                "\"/hello/bye\" : { \"post\" : { \"tags\" : [ \"/hello\" ], \"consumes\" : [ \"application/xml\" ], \"produces\" : [ \"application/xml\" ], "));
-        assertTrue(flatJson.contains(
-                "\"/tag/single\" : { \"get\" : { \"tags\" : [ \"Organisation\" ], \"consumes\" : [ \"application/json\" ], \"produces\" : [ \"application/json\" ], "));
-        assertTrue(flatJson.contains(
-                "\"/tag/multiple/a\" : { \"get\" : { \"tags\" : [ \"Organisation\", \"Group A\" ], \"consumes\" : [ \"application/json\" ], \"produces\" : [ \"application/json\" ], "));
-        assertTrue(flatJson.contains(
-                "\"/tag/multiple/b\" : { \"get\" : { \"tags\" : [ \"Organisation\", \"Group B\" ], \"consumes\" : [ \"application/json\" ], \"produces\" : [ \"application/json\" ], "));
-        assertTrue(flatJson.contains(
-                "\"tags\" : [ { \"name\" : \"/hello\" }, { \"name\" : \"Organisation\" }, { \"name\" : \"Group A\" }, { \"name\" : \"Group B\" } ]"));
-
-        context.stop();
-    }
-
     @ParameterizedTest
     @ValueSource(strings = { "3.0", "3.1" })
     public void testReaderReadV3(String version) throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV2SecuritySchemesTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV2SecuritySchemesTest.java
deleted file mode 100644
index e598ad04730..00000000000
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV2SecuritySchemesTest.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * 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.openapi;
-
-import io.swagger.v3.oas.models.OpenAPI;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
-public class RestOpenApiV2SecuritySchemesTest extends CamelTestSupport {
-
-    private final Logger log = LoggerFactory.getLogger(getClass());
-
-    @Override
-    protected RouteBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            @Override
-            public void configure() {
-                rest()
-                        .securityDefinitions()
-                            .oauth2("petstore_auth_implicit")// OAuth implicit
-                                .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
-                            .end()
-                            .oauth2("oauth_password")
-                                .flow("password")
-                                .tokenUrl("https://petstore.swagger.io/oauth/token")
-                            .end()
-                            .oauth2("oauth2_accessCode")// OAuth access/authorization code
-                                .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
-                                .tokenUrl("https://petstore.swagger.io/oauth/token")
-                            .end()
-                            .apiKey("api_key_header")
-                                .withHeader("myHeader")
-                            .end()
-                            .apiKey("api_key_query")
-                                .withQuery("myQuery")
-                            .end()
-                        .end();
-            }
-        };
-    }
-
-    @Test
-    public void testSecuritySchemesV2() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-
-        RestOpenApiReader reader = new RestOpenApiReader();
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        json = json.replace("\n", " ").replaceAll("\\s+", " ");
-
-        assertTrue(json.contains("\"petstore_auth_implicit\" : { \"type\" : \"oauth2\", \"authorizationUrl\" : " +
-                                 "\"https://petstore.swagger.io/oauth/dialog\", \"flow\" : \"implicit\" }"));
-        assertTrue(json.contains("\"oauth_password\" : { \"type\" : \"oauth2\", \"tokenUrl\" : " +
-                                 "\"https://petstore.swagger.io/oauth/token\", \"flow\" : \"password\" }"));
-        assertTrue(json.contains("\"oauth2_accessCode\" : { \"type\" : \"oauth2\", \"authorizationUrl\" : " +
-                                 "\"https://petstore.swagger.io/oauth/dialog\", \"tokenUrl\" : " +
-                                 "\"https://petstore.swagger.io/oauth/token\", \"flow\" : \"accessCode\" }"));
-        assertTrue(
-                json.contains("\"api_key_header\" : { \"type\" : \"apiKey\", \"name\" : \"myHeader\", \"in\" : \"header\" }"));
-        assertTrue(json.contains("\"api_key_query\" : { \"type\" : \"apiKey\", \"name\" : \"myQuery\", \"in\" : \"query\" }"));
-    }
-}
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV3SecuritySchemesTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV3SecuritySchemesTest.java
index c0eaca1d870..5748e49d41f 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV3SecuritySchemesTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiV3SecuritySchemesTest.java
@@ -20,14 +20,12 @@ import io.swagger.v3.oas.models.OpenAPI;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.ValueSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiV3SecuritySchemesTest extends CamelTestSupport {
@@ -41,29 +39,29 @@ public class RestOpenApiV3SecuritySchemesTest extends CamelTestSupport {
             public void configure() {
                 rest()
                         .securityDefinitions()
-                            .oauth2("petstore_auth_implicit")// OAuth implicit
-                                .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
-                                .refreshUrl("https://petstore.swagger.io/oauth/refresh")
-                            .end()
-                            .oauth2("oauth_password")
-                                .flow("password")
-                                .tokenUrl("https://petstore.swagger.io/oauth/token")
-                            .end()
-                            .oauth2("oauth2_accessCode")// OAuth access code
-                                .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
-                                .tokenUrl("https://petstore.swagger.io/oauth/token")
-                            .end()
-                            .apiKey("api_key_header")
-                                .withHeader("myHeader")
-                            .end()
-                            .apiKey("api_key_query")
-                                .withQuery("myQuery")
-                            .end()
-                            .apiKey("api_key_cookie", "API Key using cookie")
-                                .withCookie("myCookie")
-                            .end()
-                            .openIdConnect("openIdConnect_auth", "https://petstore.swagger.io/openidconnect")
-                            .mutualTLS("mutualTLS_auth")
+                        .oauth2("petstore_auth_implicit")// OAuth implicit
+                        .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
+                        .refreshUrl("https://petstore.swagger.io/oauth/refresh")
+                        .end()
+                        .oauth2("oauth_password")
+                        .flow("password")
+                        .tokenUrl("https://petstore.swagger.io/oauth/token")
+                        .end()
+                        .oauth2("oauth2_accessCode")// OAuth access code
+                        .authorizationUrl("https://petstore.swagger.io/oauth/dialog")
+                        .tokenUrl("https://petstore.swagger.io/oauth/token")
+                        .end()
+                        .apiKey("api_key_header")
+                        .withHeader("myHeader")
+                        .end()
+                        .apiKey("api_key_query")
+                        .withQuery("myQuery")
+                        .end()
+                        .apiKey("api_key_cookie", "API Key using cookie")
+                        .withCookie("myCookie")
+                        .end()
+                        .openIdConnect("openIdConnect_auth", "https://petstore.swagger.io/openidconnect")
+                        .mutualTLS("mutualTLS_auth")
                         .end();
             }
         };
@@ -111,20 +109,4 @@ public class RestOpenApiV3SecuritySchemesTest extends CamelTestSupport {
         assertTrue(json.contains("\"mutualTLS_auth\" : { \"type\" : \"mutualTLS\" }"));
     }
 
-    @Test
-    public void testSecuritySchemesV2() {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("https://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-
-        RestOpenApiReader reader = new RestOpenApiReader();
-        assertThrows(IllegalStateException.class,
-                () -> reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                        new DefaultClassResolver()));
-    }
 }
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
index bf330b4f53d..c768b74cb24 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
@@ -38,47 +38,6 @@ public class SpringRestOpenApiReaderModelApiSecurityTest extends CamelSpringTest
         return new ClassPathXmlApplicationContext("org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml");
     }
 
-    @Test
-    public void testReaderRead() throws Exception {
-        BeanConfig config = new BeanConfig();
-        config.setHost("localhost:8080");
-        config.setSchemes(new String[] { "http" });
-        config.setBasePath("/api");
-        config.setTitle("Camel User store");
-        config.setLicense("Apache 2.0");
-        config.setLicenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html");
-        config.setVersion("2.0");
-        RestOpenApiReader reader = new RestOpenApiReader();
-
-        OpenAPI openApi = reader.read(context, context.getRestDefinitions(), config, context.getName(),
-                new DefaultClassResolver());
-        assertNotNull(openApi);
-
-        String json = RestOpenApiSupport.getJsonFromOpenAPIAsString(openApi, config);
-
-        log.info(json);
-
-        assertTrue(json.contains("\"securityDefinitions\" : {"));
-        assertTrue(json.contains("\"type\" : \"oauth2\""));
-        assertTrue(json.contains("\"authorizationUrl\" : \"http://petstore.swagger.io/oauth/dialog\""));
-        assertTrue(json.contains("\"flow\" : \"implicit\""));
-        assertTrue(json.contains("\"type\" : \"apiKey\","));
-        assertTrue(json.contains("\"in\" : \"header\""));
-        assertTrue(json.contains("\"host\" : \"localhost:8080\""));
-        assertTrue(json.contains("\"security\" : [ {"));
-        assertTrue(json.contains("\"petstore_auth\" : [ \"write:pets\", \"read:pets\" ]"));
-        assertTrue(json.contains("\"api_key\" : [ ]"));
-        assertTrue(json.contains("\"description\" : \"The user returned\""));
-        assertTrue(json.contains("\"$ref\" : \"#/definitions/User\""));
-        assertTrue(json.contains("\"x-className\""));
-        assertTrue(json.contains("\"format\" : \"org.apache.camel.openapi.User\""));
-        assertTrue(json.contains("\"type\" : \"string\""));
-        assertTrue(json.contains("\"format\" : \"date\""));
-        assertFalse(json.contains("\"enum\""));
-
-        context.stop();
-    }
-
     @Test
     public void testReaderReadV3() throws Exception {
         BeanConfig config = new BeanConfig();
diff --git a/components/camel-openapi-java/src/test/resources/hello-api.json b/components/camel-openapi-java/src/test/resources/hello-api.json
index 6cc6a72f48f..52e789732f6 100644
--- a/components/camel-openapi-java/src/test/resources/hello-api.json
+++ b/components/camel-openapi-java/src/test/resources/hello-api.json
@@ -1,7 +1,10 @@
 {
-  "swagger" : "2.0",
-  "host" : "localhost:8080",
-  "basePath" : "/api",
+  "openapi": "3.0.2",
+  "servers": [
+    {
+      "url": "localhost:8080/api"
+    }
+  ],
   "tags" : [ {
     "name" : "hello"
   } ],
diff --git a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequest.json b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequest.json
deleted file mode 100644
index 54bcc6a854b..00000000000
--- a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequest.json
+++ /dev/null
@@ -1,158 +0,0 @@
-{
-  "swagger" : "2.x",
-  "host" : "localhost:8080",
-  "basePath" : "/api",
-  "schemes" : [ "http" ],
-  "paths" : {
-    "/complexRequest" : {
-      "post" : {
-        "summary" : "Demo complex request type",
-        "operationId" : "verb",
-        "consumes" : [ "application/json" ],
-        "produces" : [ "text/plain" ],
-        "parameters" : [ {
-          "in" : "body",
-          "name" : "body",
-          "required" : true,
-          "schema" : {
-            "$ref" : "#/definitions/SampleComplexRequestType"
-          }
-        } ],
-        "responses" : {
-          "200" : {
-            "description" : "Receives a complex object as parameter",
-            "schema" : {
-              "$ref" : "#/definitions/SampleComplexResponseType_InnerClass"
-            }
-          }
-        },
-        "x-camelContextId" : "camel"
-      }
-    }
-  },
-  "securityDefinitions" : {
-    "global" : {
-      "type" : "oauth2",
-      "authorizationUrl" : "https://AUTHORIZATION_URL",
-      "tokenUrl" : "https://TOKEN_URL",
-      "flow" : "accessCode",
-      "scopes" : {
-        "groups" : "Required scopes for Camel REST APIs"
-      }
-    }
-  },
-  "definitions" : {
-    "SampleComplexResponseType_InnerClass" : {
-      "type" : "object",
-      "properties" : {
-        "doubleField" : {
-          "type" : "number",
-          "format" : "double"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseType$InnerClass",
-        "type" : "string"
-      }
-    },
-    "CustomData" : {
-      "type" : "object",
-      "properties" : {
-        "customDataField" : {
-          "type" : "string"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.CustomData",
-        "type" : "string"
-      }
-    },
-    "SampleComplexRequestType" : {
-      "type" : "object",
-      "required" : [ "mapOfStrings", "requestField1" ],
-      "properties" : {
-        "requestField1" : {
-          "type" : "string"
-        },
-        "requestField2" : {
-          "type" : "string"
-        },
-        "listOfStrings" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "data" : {
-          "$ref" : "#/definitions/CustomData"
-        },
-        "mapOfData" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "$ref" : "#/definitions/CustomData"
-          }
-        },
-        "arrayOfString" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "mapOfMapOfData" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "type" : "object",
-            "additionalProperties" : {
-              "$ref" : "#/definitions/CustomData"
-            }
-          }
-        },
-        "innerClass" : {
-          "$ref" : "#/definitions/SampleComplexRequestType_InnerClass"
-        },
-        "listOfListOfData" : {
-          "type" : "array",
-          "items" : {
-            "type" : "array",
-            "items" : {
-              "$ref" : "#/definitions/CustomData"
-            }
-          }
-        },
-        "listOfData" : {
-          "type" : "array",
-          "items" : {
-            "$ref" : "#/definitions/CustomData"
-          }
-        },
-        "mapOfStrings" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "type" : "string"
-          }
-        },
-        "timeUnit" : {
-          "type" : "string",
-          "enum" : [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ]
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestType",
-        "type" : "string"
-      }
-    },
-    "SampleComplexRequestType_InnerClass" : {
-      "type" : "object",
-      "properties" : {
-        "longField" : {
-          "type" : "integer",
-          "format" : "int64"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestType$InnerClass",
-        "type" : "string"
-      }
-    }
-  }
-}
diff --git a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequestWithSchemaAnnotation.json b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequestWithSchemaAnnotation.json
deleted file mode 100644
index d82c34fab19..00000000000
--- a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesRequestWithSchemaAnnotation.json
+++ /dev/null
@@ -1,158 +0,0 @@
-{
-  "swagger" : "2.x",
-  "host" : "localhost:8080",
-  "basePath" : "/api",
-  "schemes" : [ "http" ],
-  "paths" : {
-    "/complexRequestWithSchemaAnnotation" : {
-      "post" : {
-        "summary" : "Demo complex request type",
-        "operationId" : "verb",
-        "consumes" : [ "application/json" ],
-        "produces" : [ "text/plain" ],
-        "parameters" : [ {
-          "in" : "body",
-          "name" : "body",
-          "required" : true,
-          "schema" : {
-            "$ref" : "#/definitions/sampleRequestWithSchema"
-          }
-        } ],
-        "responses" : {
-          "200" : {
-            "description" : "Receives a complex object as parameter",
-            "schema" : {
-              "$ref" : "#/definitions/responseInner"
-            }
-          }
-        },
-        "x-camelContextId" : "camel"
-      }
-    }
-  },
-  "securityDefinitions" : {
-    "global" : {
-      "type" : "oauth2",
-      "authorizationUrl" : "https://AUTHORIZATION_URL",
-      "tokenUrl" : "https://TOKEN_URL",
-      "flow" : "accessCode",
-      "scopes" : {
-        "groups" : "Required scopes for Camel REST APIs"
-      }
-    }
-  },
-  "definitions" : {
-    "requestInner" : {
-      "type" : "object",
-      "properties" : {
-        "longField" : {
-          "type" : "integer",
-          "format" : "int64"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestTypeWithSchemaAnnotation$InnerClass",
-        "type" : "string"
-      }
-    },
-    "sampleRequestWithSchema" : {
-      "type" : "object",
-      "required" : [ "mapOfStrings", "requestField1" ],
-      "properties" : {
-        "requestField1" : {
-          "type" : "string"
-        },
-        "requestField2" : {
-          "type" : "string"
-        },
-        "listOfStrings" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "data" : {
-          "$ref" : "#/definitions/customData"
-        },
-        "mapOfData" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "$ref" : "#/definitions/customData"
-          }
-        },
-        "arrayOfString" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "mapOfMapOfData" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "type" : "object",
-            "additionalProperties" : {
-              "$ref" : "#/definitions/customData"
-            }
-          }
-        },
-        "innerClass" : {
-          "$ref" : "#/definitions/requestInner"
-        },
-        "listOfListOfData" : {
-          "type" : "array",
-          "items" : {
-            "type" : "array",
-            "items" : {
-              "$ref" : "#/definitions/customData"
-            }
-          }
-        },
-        "listOfData" : {
-          "type" : "array",
-          "items" : {
-            "$ref" : "#/definitions/customData"
-          }
-        },
-        "mapOfStrings" : {
-          "type" : "object",
-          "additionalProperties" : {
-            "type" : "string"
-          }
-        },
-        "timeUnit" : {
-          "type" : "string",
-          "enum" : [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ]
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestTypeWithSchemaAnnotation",
-        "type" : "string"
-      }
-    },
-    "customData" : {
-      "type" : "object",
-      "properties" : {
-        "customDataField" : {
-          "type" : "string"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.CustomDataWithSchemaAnnotation",
-        "type" : "string"
-      }
-    },
-    "responseInner" : {
-      "type" : "object",
-      "properties" : {
-        "doubleField" : {
-          "type" : "number",
-          "format" : "double"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseTypeWithSchemaAnnotation$InnerClass",
-        "type" : "string"
-      }
-    }
-  }
-}
diff --git a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponse.json b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponse.json
deleted file mode 100644
index c5fc9b0ede1..00000000000
--- a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponse.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-  "swagger" : "2.x",
-  "host" : "localhost:8080",
-  "basePath" : "/api",
-  "schemes" : [ "http" ],
-  "paths" : {
-    "/complexResponse" : {
-      "get" : {
-        "summary" : "Demo complex response type",
-        "operationId" : "verb",
-        "consumes" : [ "application/json" ],
-        "produces" : [ "application/json" ],
-        "parameters" : [ {
-          "in" : "body",
-          "name" : "body",
-          "required" : true,
-          "schema" : {
-            "$ref" : "#/definitions/SampleComplexRequestType_InnerClass"
-          }
-        } ],
-        "responses" : {
-          "200" : {
-            "description" : "Returns a complex object",
-            "schema" : {
-              "$ref" : "#/definitions/SampleComplexResponseType"
-            }
-          }
-        },
-        "x-camelContextId" : "camel"
-      }
-    }
-  },
-  "securityDefinitions" : {
-    "global" : {
-      "type" : "oauth2",
-      "authorizationUrl" : "https://AUTHORIZATION_URL",
-      "tokenUrl" : "https://TOKEN_URL",
-      "flow" : "accessCode",
-      "scopes" : {
-        "groups" : "Required scopes for Camel REST APIs"
-      }
-    }
-  },
-  "definitions" : {
-    "SampleComplexResponseType_InnerClass" : {
-      "type" : "object",
-      "properties" : {
-        "doubleField" : {
-          "type" : "number",
-          "format" : "double"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseType$InnerClass",
-        "type" : "string"
-      }
-    },
-    "SampleComplexResponseType" : {
-      "type" : "object",
-      "required" : [ "arrayOfStrings", "responseField1" ],
-      "properties" : {
-        "innerClass" : {
-          "$ref" : "#/definitions/SampleComplexResponseType_InnerClass"
-        },
-        "arrayOfStrings" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "month" : {
-          "type" : "string",
-          "enum" : [ "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" ]
-        },
-        "responseField2" : {
-          "type" : "string"
-        },
-        "responseField1" : {
-          "type" : "string"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseType",
-        "type" : "string"
-      }
-    },
-    "SampleComplexRequestType_InnerClass" : {
-      "type" : "object",
-      "properties" : {
-        "longField" : {
-          "type" : "integer",
-          "format" : "int64"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestType$InnerClass",
-        "type" : "string"
-      }
-    }
-  }
-}
\ No newline at end of file
diff --git a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponseWithSchemaAnnotation.json b/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponseWithSchemaAnnotation.json
deleted file mode 100644
index 1f31689ae3b..00000000000
--- a/components/camel-openapi-java/src/test/resources/org/apache/camel/openapi/V20SchemaForComplexTypesResponseWithSchemaAnnotation.json
+++ /dev/null
@@ -1,101 +0,0 @@
-{
-  "swagger" : "2.x",
-  "host" : "localhost:8080",
-  "basePath" : "/api",
-  "schemes" : [ "http" ],
-  "paths" : {
-    "/complexResponseWithSchemaAnnotation" : {
-      "get" : {
-        "summary" : "Demo complex response type",
-        "operationId" : "verb",
-        "consumes" : [ "application/json" ],
-        "produces" : [ "application/json" ],
-        "parameters" : [ {
-          "in" : "body",
-          "name" : "body",
-          "required" : true,
-          "schema" : {
-            "$ref" : "#/definitions/SampleComplexRequestType_InnerClass"
-          }
-        } ],
-        "responses" : {
-          "200" : {
-            "description" : "Returns a complex object",
-            "schema" : {
-              "$ref" : "#/definitions/sampleResponseWithSchema"
-            }
-          }
-        },
-        "x-camelContextId" : "camel"
-      }
-    }
-  },
-  "securityDefinitions" : {
-    "global" : {
-      "type" : "oauth2",
-      "authorizationUrl" : "https://AUTHORIZATION_URL",
-      "tokenUrl" : "https://TOKEN_URL",
-      "flow" : "accessCode",
-      "scopes" : {
-        "groups" : "Required scopes for Camel REST APIs"
-      }
-    }
-  },
-  "definitions" : {
-    "sampleResponseWithSchema" : {
-      "type" : "object",
-      "required" : [ "arrayOfStrings", "responseField1" ],
-      "properties" : {
-        "innerClass" : {
-          "$ref" : "#/definitions/responseInner"
-        },
-        "arrayOfStrings" : {
-          "type" : "array",
-          "items" : {
-            "type" : "string"
-          }
-        },
-        "month" : {
-          "type" : "string",
-          "enum" : [ "JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER" ]
-        },
-        "responseField2" : {
-          "type" : "string"
-        },
-        "responseField1" : {
-          "type" : "string"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseTypeWithSchemaAnnotation",
-        "type" : "string"
-      }
-    },
-    "responseInner" : {
-      "type" : "object",
-      "properties" : {
-        "doubleField" : {
-          "type" : "number",
-          "format" : "double"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexResponseTypeWithSchemaAnnotation$InnerClass",
-        "type" : "string"
-      }
-    },
-    "SampleComplexRequestType_InnerClass" : {
-      "type" : "object",
-      "properties" : {
-        "longField" : {
-          "type" : "integer",
-          "format" : "int64"
-        }
-      },
-      "x-className" : {
-        "format" : "org.apache.camel.openapi.model.SampleComplexRequestType$InnerClass",
-        "type" : "string"
-      }
-    }
-  }
-}
diff --git a/components/camel-openapi-java/src/test/resources/petstore-v3.json b/components/camel-openapi-java/src/test/resources/petstore-v3.json
index f01d15ec8c2..01732bb6fd1 100644
--- a/components/camel-openapi-java/src/test/resources/petstore-v3.json
+++ b/components/camel-openapi-java/src/test/resources/petstore-v3.json
@@ -1 +1,1225 @@
-{"openapi":"3.0.2","info":{"title":"Swagger Petstore - OpenAPI 3.0","description":"This is a sample Pet Store Server based on the OpenAPI 3.0 specification.  You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, an [...]
\ No newline at end of file
+{
+  "openapi": "3.0.2",
+  "info": {
+    "title": "Swagger Petstore - OpenAPI 3.0",
+    "description": "This is a sample Pet Store Server based on the OpenAPI 3.0 specification.  You can find out more about\nSwagger at [http://swagger.io](http://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!\nYou can now help us improve the API whether it's by making changes to the definition itself or to the code.\nThat way, with time, we can improve the API in general, and expose some of the new features in OAS3.\n\nSome useful links [...]
+    "termsOfService": "http://swagger.io/terms/",
+    "contact": {
+      "email": "apiteam@swagger.io"
+    },
+    "license": {
+      "name": "Apache 2.0",
+      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+    },
+    "version": "1.0.4"
+  },
+  "externalDocs": {
+    "description": "Find out more about Swagger",
+    "url": "http://swagger.io"
+  },
+  "servers": [
+    {
+      "url": "/api/v3"
+    }
+  ],
+  "tags": [
+    {
+      "name": "pet",
+      "description": "Everything about your Pets",
+      "externalDocs": {
+        "description": "Find out more",
+        "url": "http://swagger.io"
+      }
+    },
+    {
+      "name": "store",
+      "description": "Operations about user"
+    },
+    {
+      "name": "user",
+      "description": "Access to Petstore orders",
+      "externalDocs": {
+        "description": "Find out more about our store",
+        "url": "http://swagger.io"
+      }
+    }
+  ],
+  "paths": {
+    "/pet": {
+      "put": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Update an existing pet",
+        "description": "Update an existing pet by Id",
+        "operationId": "updatePet",
+        "requestBody": {
+          "description": "Update an existent pet in the store",
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            },
+            "application/x-www-form-urlencoded": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "Successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid ID supplied"
+          },
+          "404": {
+            "description": "Pet not found"
+          },
+          "405": {
+            "description": "Validation exception"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      },
+      "post": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Add a new pet to the store",
+        "description": "Add a new pet to the store",
+        "operationId": "addPet",
+        "requestBody": {
+          "description": "Create a new pet in the store",
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            },
+            "application/x-www-form-urlencoded": {
+              "schema": {
+                "$ref": "#/components/schemas/Pet"
+              }
+            }
+          },
+          "required": true
+        },
+        "responses": {
+          "200": {
+            "description": "Successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              }
+            }
+          },
+          "405": {
+            "description": "Invalid input"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      }
+    },
+    "/pet/findByStatus": {
+      "get": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Finds Pets by status",
+        "description": "Multiple status values can be provided with comma separated strings",
+        "operationId": "findPetsByStatus",
+        "parameters": [
+          {
+            "name": "status",
+            "in": "query",
+            "description": "Status values that need to be considered for filter",
+            "required": false,
+            "explode": true,
+            "schema": {
+              "type": "string",
+              "default": "available",
+              "enum": [
+                "available",
+                "pending",
+                "sold"
+              ]
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Pet"
+                  }
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Pet"
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid status value"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      }
+    },
+    "/pet/findByTags": {
+      "get": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Finds Pets by tags",
+        "description": "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
+        "operationId": "findPetsByTags",
+        "parameters": [
+          {
+            "name": "tags",
+            "in": "query",
+            "description": "Tags to filter by",
+            "required": false,
+            "explode": true,
+            "schema": {
+              "type": "array",
+              "items": {
+                "type": "string"
+              }
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Pet"
+                  }
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "array",
+                  "items": {
+                    "$ref": "#/components/schemas/Pet"
+                  }
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid tag value"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      }
+    },
+    "/pet/{petId}": {
+      "get": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Find pet by ID",
+        "description": "Returns a single pet",
+        "operationId": "getPetById",
+        "parameters": [
+          {
+            "name": "petId",
+            "in": "path",
+            "description": "ID of pet to return",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Pet"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid ID supplied"
+          },
+          "404": {
+            "description": "Pet not found"
+          }
+        },
+        "security": [
+          {
+            "api_key": []
+          },
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      },
+      "post": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Updates a pet in the store with form data",
+        "description": "",
+        "operationId": "updatePetWithForm",
+        "parameters": [
+          {
+            "name": "petId",
+            "in": "path",
+            "description": "ID of pet that needs to be updated",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          },
+          {
+            "name": "name",
+            "in": "query",
+            "description": "Name of pet that needs to be updated",
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "status",
+            "in": "query",
+            "description": "Status of pet that needs to be updated",
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "405": {
+            "description": "Invalid input"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      },
+      "delete": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "Deletes a pet",
+        "description": "",
+        "operationId": "deletePet",
+        "parameters": [
+          {
+            "name": "api_key",
+            "in": "header",
+            "description": "",
+            "required": false,
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "petId",
+            "in": "path",
+            "description": "Pet id to delete",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          }
+        ],
+        "responses": {
+          "400": {
+            "description": "Invalid pet value"
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      }
+    },
+    "/pet/{petId}/uploadImage": {
+      "post": {
+        "tags": [
+          "pet"
+        ],
+        "summary": "uploads an image",
+        "description": "",
+        "operationId": "uploadFile",
+        "parameters": [
+          {
+            "name": "petId",
+            "in": "path",
+            "description": "ID of pet to update",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          },
+          {
+            "name": "additionalMetadata",
+            "in": "query",
+            "description": "Additional Metadata",
+            "required": false,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "content": {
+            "application/octet-stream": {
+              "schema": {
+                "type": "string",
+                "format": "binary"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/ApiResponse"
+                }
+              }
+            }
+          }
+        },
+        "security": [
+          {
+            "petstore_auth": [
+              "write:pets",
+              "read:pets"
+            ]
+          }
+        ]
+      }
+    },
+    "/store/inventory": {
+      "get": {
+        "tags": [
+          "store"
+        ],
+        "summary": "Returns pet inventories by status",
+        "description": "Returns a map of status codes to quantities",
+        "operationId": "getInventory",
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "additionalProperties": {
+                    "type": "integer",
+                    "format": "int32"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "security": [
+          {
+            "api_key": []
+          }
+        ]
+      }
+    },
+    "/store/order": {
+      "post": {
+        "tags": [
+          "store"
+        ],
+        "summary": "Place an order for a pet",
+        "description": "Place a new order in the store",
+        "operationId": "placeOrder",
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/Order"
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/Order"
+              }
+            },
+            "application/x-www-form-urlencoded": {
+              "schema": {
+                "$ref": "#/components/schemas/Order"
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Order"
+                }
+              }
+            }
+          },
+          "405": {
+            "description": "Invalid input"
+          }
+        }
+      }
+    },
+    "/store/order/{orderId}": {
+      "get": {
+        "tags": [
+          "store"
+        ],
+        "summary": "Find purchase order by ID",
+        "description": "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions",
+        "operationId": "getOrderById",
+        "parameters": [
+          {
+            "name": "orderId",
+            "in": "path",
+            "description": "ID of order that needs to be fetched",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/Order"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/Order"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid ID supplied"
+          },
+          "404": {
+            "description": "Order not found"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "store"
+        ],
+        "summary": "Delete purchase order by ID",
+        "description": "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors",
+        "operationId": "deleteOrder",
+        "parameters": [
+          {
+            "name": "orderId",
+            "in": "path",
+            "description": "ID of the order that needs to be deleted",
+            "required": true,
+            "schema": {
+              "type": "integer",
+              "format": "int64"
+            }
+          }
+        ],
+        "responses": {
+          "400": {
+            "description": "Invalid ID supplied"
+          },
+          "404": {
+            "description": "Order not found"
+          }
+        }
+      }
+    },
+    "/user": {
+      "post": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Create user",
+        "description": "This can only be done by the logged in user.",
+        "operationId": "createUser",
+        "requestBody": {
+          "description": "Created user object",
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            },
+            "application/x-www-form-urlencoded": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            }
+          }
+        },
+        "responses": {
+          "default": {
+            "description": "successful operation",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              },
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          }
+        }
+      }
+    },
+    "/user/createWithList": {
+      "post": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Creates list of users with given input array",
+        "description": "Creates list of users with given input array",
+        "operationId": "createUsersWithListInput",
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "array",
+                "items": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "Successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          },
+          "default": {
+            "description": "successful operation"
+          }
+        }
+      }
+    },
+    "/user/login": {
+      "get": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Logs user into the system",
+        "description": "",
+        "operationId": "loginUser",
+        "parameters": [
+          {
+            "name": "username",
+            "in": "query",
+            "description": "The user name for login",
+            "required": false,
+            "schema": {
+              "type": "string"
+            }
+          },
+          {
+            "name": "password",
+            "in": "query",
+            "description": "The password for login in clear text",
+            "required": false,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "headers": {
+              "X-Rate-Limit": {
+                "description": "calls per hour allowed by the user",
+                "schema": {
+                  "type": "integer",
+                  "format": "int32"
+                }
+              },
+              "X-Expires-After": {
+                "description": "date in UTC when toekn expires",
+                "schema": {
+                  "type": "string",
+                  "format": "date-time"
+                }
+              }
+            },
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "type": "string"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "type": "string"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid username/password supplied"
+          }
+        }
+      }
+    },
+    "/user/logout": {
+      "get": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Logs out current logged in user session",
+        "description": "",
+        "operationId": "logoutUser",
+        "parameters": [],
+        "responses": {
+          "default": {
+            "description": "successful operation"
+          }
+        }
+      }
+    },
+    "/user/{username}": {
+      "get": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Get user by user name",
+        "description": "",
+        "operationId": "getUserByName",
+        "parameters": [
+          {
+            "name": "username",
+            "in": "path",
+            "description": "The name that needs to be fetched. Use user1 for testing. ",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "200": {
+            "description": "successful operation",
+            "content": {
+              "application/xml": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              },
+              "application/json": {
+                "schema": {
+                  "$ref": "#/components/schemas/User"
+                }
+              }
+            }
+          },
+          "400": {
+            "description": "Invalid username supplied"
+          },
+          "404": {
+            "description": "User not found"
+          }
+        }
+      },
+      "put": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Update user",
+        "description": "This can only be done by the logged in user.",
+        "operationId": "updateUser",
+        "parameters": [
+          {
+            "name": "username",
+            "in": "path",
+            "description": "name that need to be deleted",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "requestBody": {
+          "description": "Update an existent user in the store",
+          "content": {
+            "application/json": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            },
+            "application/xml": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            },
+            "application/x-www-form-urlencoded": {
+              "schema": {
+                "$ref": "#/components/schemas/User"
+              }
+            }
+          }
+        },
+        "responses": {
+          "default": {
+            "description": "successful operation"
+          }
+        }
+      },
+      "delete": {
+        "tags": [
+          "user"
+        ],
+        "summary": "Delete user",
+        "description": "This can only be done by the logged in user.",
+        "operationId": "deleteUser",
+        "parameters": [
+          {
+            "name": "username",
+            "in": "path",
+            "description": "The name that needs to be deleted",
+            "required": true,
+            "schema": {
+              "type": "string"
+            }
+          }
+        ],
+        "responses": {
+          "400": {
+            "description": "Invalid username supplied"
+          },
+          "404": {
+            "description": "User not found"
+          }
+        }
+      }
+    }
+  },
+  "components": {
+    "schemas": {
+      "Order": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64",
+            "example": 10
+          },
+          "petId": {
+            "type": "integer",
+            "format": "int64",
+            "example": 198772
+          },
+          "quantity": {
+            "type": "integer",
+            "format": "int32",
+            "example": 7
+          },
+          "shipDate": {
+            "type": "string",
+            "format": "date-time"
+          },
+          "status": {
+            "type": "string",
+            "description": "Order Status",
+            "example": "approved",
+            "enum": [
+              "placed",
+              "approved",
+              "delivered"
+            ]
+          },
+          "complete": {
+            "type": "boolean"
+          }
+        },
+        "xml": {
+          "name": "order"
+        }
+      },
+      "Customer": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64",
+            "example": 100000
+          },
+          "username": {
+            "type": "string",
+            "example": "fehguy"
+          },
+          "address": {
+            "type": "array",
+            "xml": {
+              "name": "addresses",
+              "wrapped": true
+            },
+            "items": {
+              "$ref": "#/components/schemas/Address"
+            }
+          }
+        },
+        "xml": {
+          "name": "customer"
+        }
+      },
+      "Address": {
+        "type": "object",
+        "properties": {
+          "street": {
+            "type": "string",
+            "example": "437 Lytton"
+          },
+          "city": {
+            "type": "string",
+            "example": "Palo Alto"
+          },
+          "state": {
+            "type": "string",
+            "example": "CA"
+          },
+          "zip": {
+            "type": "string",
+            "example": "94301"
+          }
+        },
+        "xml": {
+          "name": "address"
+        }
+      },
+      "Category": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64",
+            "example": 1
+          },
+          "name": {
+            "type": "string",
+            "example": "Dogs"
+          }
+        },
+        "xml": {
+          "name": "category"
+        }
+      },
+      "User": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64",
+            "example": 10
+          },
+          "username": {
+            "type": "string",
+            "example": "theUser"
+          },
+          "firstName": {
+            "type": "string",
+            "example": "John"
+          },
+          "lastName": {
+            "type": "string",
+            "example": "James"
+          },
+          "email": {
+            "type": "string",
+            "example": "john@email.com"
+          },
+          "password": {
+            "type": "string",
+            "example": "12345"
+          },
+          "phone": {
+            "type": "string",
+            "example": "12345"
+          },
+          "userStatus": {
+            "type": "integer",
+            "description": "User Status",
+            "format": "int32",
+            "example": 1
+          }
+        },
+        "xml": {
+          "name": "user"
+        }
+      },
+      "Tag": {
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64"
+          },
+          "name": {
+            "type": "string"
+          }
+        },
+        "xml": {
+          "name": "tag"
+        }
+      },
+      "Pet": {
+        "required": [
+          "name",
+          "photoUrls"
+        ],
+        "type": "object",
+        "properties": {
+          "id": {
+            "type": "integer",
+            "format": "int64",
+            "example": 10
+          },
+          "name": {
+            "type": "string",
+            "example": "doggie"
+          },
+          "category": {
+            "$ref": "#/components/schemas/Category"
+          },
+          "photoUrls": {
+            "type": "array",
+            "xml": {
+              "wrapped": true
+            },
+            "items": {
+              "type": "string",
+              "xml": {
+                "name": "photoUrl"
+              }
+            }
+          },
+          "tags": {
+            "type": "array",
+            "xml": {
+              "wrapped": true
+            },
+            "items": {
+              "$ref": "#/components/schemas/Tag"
+            }
+          },
+          "status": {
+            "type": "string",
+            "description": "pet status in the store",
+            "enum": [
+              "available",
+              "pending",
+              "sold"
+            ]
+          }
+        },
+        "xml": {
+          "name": "pet"
+        }
+      },
+      "ApiResponse": {
+        "type": "object",
+        "properties": {
+          "code": {
+            "type": "integer",
+            "format": "int32"
+          },
+          "type": {
+            "type": "string"
+          },
+          "message": {
+            "type": "string"
+          }
+        },
+        "xml": {
+          "name": "##default"
+        }
+      }
+    },
+    "requestBodies": {
+      "Pet": {
+        "description": "Pet object that needs to be added to the store",
+        "content": {
+          "application/json": {
+            "schema": {
+              "$ref": "#/components/schemas/Pet"
+            }
+          },
+          "application/xml": {
+            "schema": {
+              "$ref": "#/components/schemas/Pet"
+            }
+          }
+        }
+      },
+      "UserArray": {
+        "description": "List of user object",
+        "content": {
+          "application/json": {
+            "schema": {
+              "type": "array",
+              "items": {
+                "$ref": "#/components/schemas/User"
+              }
+            }
+          }
+        }
+      }
+    },
+    "securitySchemes": {
+      "petstore_auth": {
+        "type": "oauth2",
+        "flows": {
+          "implicit": {
+            "authorizationUrl": "https://petstore3.swagger.io/oauth/authorize",
+            "scopes": {
+              "write:pets": "modify pets in your account",
+              "read:pets": "read your pets"
+            }
+          }
+        }
+      },
+      "api_key": {
+        "type": "apiKey",
+        "name": "api_key",
+        "in": "header"
+      }
+    }
+  }
+}
\ No newline at end of file
diff --git a/components/camel-openapi-java/src/test/resources/petstore.json b/components/camel-openapi-java/src/test/resources/petstore.json
deleted file mode 100644
index 816847f31bb..00000000000
--- a/components/camel-openapi-java/src/test/resources/petstore.json
+++ /dev/null
@@ -1 +0,0 @@
-{"swagger":"2.0","info":{"description":"This is a sample server Petstore server.  You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.","version":"1.0.0","title":"Swagger Petstore","termsOfService":"http://swagger.io/terms/","contact":{"email":"apiteam@swagger.io"},"license":{"name":"Apache 2.0","url":"http://www.a [...]
\ No newline at end of file
diff --git a/components/camel-rest-openapi/pom.xml b/components/camel-rest-openapi/pom.xml
index 61cd8a248e0..497e1a11724 100644
--- a/components/camel-rest-openapi/pom.xml
+++ b/components/camel-rest-openapi/pom.xml
@@ -51,13 +51,34 @@
 
          <dependency>
             <groupId>io.swagger.core.v3</groupId>
-            <artifactId>swagger-models</artifactId>
+            <artifactId>swagger-core-jakarta</artifactId>
+            <version>${swagger-openapi3-version}</version>
+        </dependency>
+         <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-models-jakarta</artifactId>
             <version>${swagger-openapi3-version}</version>
         </dependency>
         <dependency>
             <groupId>io.swagger.parser.v3</groupId>
-            <artifactId>swagger-parser</artifactId>
+            <artifactId>swagger-parser-v3</artifactId>
             <version>${swagger-openapi3-java-parser-version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!-- swagger requires javax.xml.bind.annotation.XmlElement -->
+        <dependency>
+            <groupId>javax.xml.bind</groupId>
+            <artifactId>jaxb-api</artifactId>
+            <version>2.3.1</version>
         </dependency>
 
         <dependency>
@@ -69,6 +90,12 @@
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>
             <version>${jackson2-version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.dataformat</groupId>
diff --git a/dsl/camel-jbang/camel-jbang-core/pom.xml b/dsl/camel-jbang/camel-jbang-core/pom.xml
index 656d2c6a182..46876c47084 100644
--- a/dsl/camel-jbang/camel-jbang-core/pom.xml
+++ b/dsl/camel-jbang/camel-jbang-core/pom.xml
@@ -130,15 +130,35 @@
         </dependency>
         <!-- code generator -->
         <dependency>
-            <groupId>org.apache.camel</groupId>
-            <artifactId>camel-openapi-rest-dsl-generator</artifactId>
-            <version>${project.version}</version>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-core-jakarta</artifactId>
+            <version>${swagger-openapi3-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.core.v3</groupId>
+            <artifactId>swagger-models-jakarta</artifactId>
+            <version>${swagger-openapi3-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.swagger.parser.v3</groupId>
+            <artifactId>swagger-parser-v3</artifactId>
+            <version>${swagger-openapi3-java-parser-version}</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>org.openapitools</groupId>
             <artifactId>openapi-generator</artifactId>
             <version>${openapi-generator}</version>
             <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.parser.v3</groupId>
+                    <artifactId>*</artifactId>
+                </exclusion>
                 <exclusion>
                     <groupId>org.slf4j</groupId>
                     <artifactId>slf4j-api</artifactId>
@@ -149,6 +169,11 @@
                 </exclusion>
             </exclusions>
         </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-openapi-rest-dsl-generator</artifactId>
+            <version>${project.version}</version>
+        </dependency>
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
             <artifactId>jackson-databind</artifactId>


(camel) 02/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit a86767187366098dd0731a7e058d2ad7dd2165cb
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 09:31:22 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 .../src/main/docs/openapi-java.adoc                |    2 +
 components/camel-rest-openapi/pom.xml              |   31 +-
 .../src/main/docs/rest-openapi-component.adoc      |    2 +
 .../camel/component/rest/openapi/HttpsTest.java    |  186 ----
 .../camel/component/rest/openapi/HttpsV3Test.java  |    2 +-
 .../rest/openapi/RestOpenApiComponentTest.java     |  299 ------
 .../rest/openapi/RestOpenApiComponentYamlTest.java |  269 -----
 .../rest/openapi/RestOpenApiDelegateHttpsTest.java |   48 -
 .../rest/openapi/RestOpenApiGlobalHttpsTest.java   |   33 -
 .../openapi/RestOpenApiGlobalHttpsV31Test.java     |    2 +-
 .../openapi/RestOpenApiRequestValidationTest.java  |   10 +-
 .../src/test/resources/alt-petstore.json           | 1039 --------------------
 .../src/test/resources/alt-petstore.yaml           |  716 --------------
 .../src/test/resources/fruits-2.0.yaml             |  146 ---
 14 files changed, 27 insertions(+), 2758 deletions(-)

diff --git a/components/camel-openapi-java/src/main/docs/openapi-java.adoc b/components/camel-openapi-java/src/main/docs/openapi-java.adoc
index bfe1a7e9a49..cc022a3a8f7 100644
--- a/components/camel-openapi-java/src/main/docs/openapi-java.adoc
+++ b/components/camel-openapi-java/src/main/docs/openapi-java.adoc
@@ -15,6 +15,8 @@ The  Rest DSL can be integrated with
 the `camel-openapi-java` module which is used for exposing the REST
 services and their APIs using https://www.openapis.org/[OpenApi].
 
+IMPORTANT: Only OpenAPI spec version 3.x is supported. You cannot use the old Swagger 2.0 spec.
+
 Maven users will need to add the following dependency to
 their `pom.xml` for this component:
 
diff --git a/components/camel-rest-openapi/pom.xml b/components/camel-rest-openapi/pom.xml
index 497e1a11724..47b7d883b14 100644
--- a/components/camel-rest-openapi/pom.xml
+++ b/components/camel-rest-openapi/pom.xml
@@ -65,21 +65,19 @@
             <version>${swagger-openapi3-java-parser-version}</version>
             <exclusions>
                 <exclusion>
-                    <groupId>io.swagger.core.v3</groupId>
-                    <artifactId>swagger-core</artifactId>
+                    <groupId>io.swagger.parser.v3</groupId>
+                    <artifactId>swagger-parser-v2-converter</artifactId>
                 </exclusion>
                 <exclusion>
                     <groupId>io.swagger.core.v3</groupId>
                     <artifactId>swagger-models</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-core</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
-        <!-- swagger requires javax.xml.bind.annotation.XmlElement -->
-        <dependency>
-            <groupId>javax.xml.bind</groupId>
-            <artifactId>jaxb-api</artifactId>
-            <version>2.3.1</version>
-        </dependency>
 
         <dependency>
             <groupId>com.fasterxml.jackson.core</groupId>
@@ -102,17 +100,24 @@
             <artifactId>jackson-dataformat-yaml</artifactId>
             <version>${jackson2-version}</version>
         </dependency>
-        <dependency>
-            <groupId>com.fasterxml.jackson.datatype</groupId>
-            <artifactId>jackson-datatype-jdk8</artifactId>
-            <version>${jackson2-version}</version>
-        </dependency>
 
         <dependency>
             <groupId>com.atlassian.oai</groupId>
             <artifactId>swagger-request-validator-core</artifactId>
             <version>${swagger-request-validator-version}</version>
             <exclusions>
+                <exclusion>
+                    <groupId>io.swagger.parser.v3</groupId>
+                    <artifactId>swagger-parser-v2-converter</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-models</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>io.swagger.core.v3</groupId>
+                    <artifactId>swagger-core</artifactId>
+                </exclusion>
                 <exclusion>
                     <groupId>com.google.code.findbugs</groupId>
                     <artifactId>findbugs</artifactId>
diff --git a/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc b/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
index 8bb91aa9547..903dab2155b 100644
--- a/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
+++ b/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
@@ -25,6 +25,8 @@ interface. Currently, known working components are:
 * xref:undertow-component.adoc[undertow]
 * xref:vertx-http-component.adoc[vertx-http]
 
+IMPORTANT: Only OpenAPI spec version 3.x is supported. You cannot use the old Swagger 2.0 spec.
+
 Maven users will need to add the following dependency to their
 `pom.xml` for this component:
 
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
deleted file mode 100644
index d1b9734643e..00000000000
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsTest.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * 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.rest.openapi;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.security.KeyStore;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-
-import jakarta.xml.bind.JAXBContext;
-import jakarta.xml.bind.Marshaller;
-
-import javax.net.ssl.TrustManager;
-import javax.net.ssl.TrustManagerFactory;
-
-import com.github.tomakehurst.wiremock.WireMockServer;
-import com.github.tomakehurst.wiremock.common.HttpsSettings;
-import com.google.common.io.Resources;
-import org.apache.camel.CamelContext;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.rest.RestEndpoint;
-import org.apache.camel.converter.jaxb.JaxbDataFormat;
-import org.apache.camel.support.jsse.CipherSuitesParameters;
-import org.apache.camel.support.jsse.SSLContextParameters;
-import org.apache.camel.support.jsse.TrustManagersParameters;
-import org.apache.camel.test.junit5.CamelTestSupport;
-import org.eclipse.jetty.util.resource.Resource;
-import org.eclipse.jetty.util.security.CertificateUtils;
-import org.junit.jupiter.api.AfterAll;
-import org.junit.jupiter.api.BeforeAll;
-import org.junit.jupiter.api.BeforeEach;
-import org.junit.jupiter.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public abstract class HttpsTest extends CamelTestSupport {
-
-    protected static WireMockServer petstore = new WireMockServer(
-            wireMockConfig().httpServerFactory(new WireMockJettyServerFactory()).containerThreads(13).dynamicPort()
-                    .dynamicHttpsPort().keystorePath(Resources.getResource("localhost.p12").toString()).keystoreType("PKCS12")
-                    .keystorePassword("changeit").keyManagerPassword("changeit"));
-
-    static final Object NO_BODY = null;
-
-    public String componentName;
-
-    @BeforeAll
-    public static void startWireMockServer() {
-        petstore.start();
-    }
-
-    @AfterAll
-    public static void stopWireMockServer() {
-        petstore.stop();
-    }
-
-    @Override
-    public void setUp() {
-    }
-
-    @BeforeEach
-    public void resetWireMock() {
-        petstore.resetRequests();
-    }
-
-    public void doSetUp(String componentName) throws Exception {
-        this.componentName = componentName;
-        super.setUp();
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeConfiguredForHttps(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = template.requestBodyAndHeader("direct:getPetById", NO_BODY, "petId", 14, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext camelContext = super.createCamelContext();
-
-        final RestOpenApiComponent component = new RestOpenApiComponent();
-        component.setComponentName(componentName);
-        component.setHost("https://localhost:" + petstore.httpsPort());
-
-        camelContext.addComponent("petStore", component);
-
-        return camelContext;
-    }
-
-    @Override
-    protected RoutesBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                final JAXBContext jaxbContext = JAXBContext.newInstance(Pet.class, Pets.class);
-
-                final JaxbDataFormat jaxb = new JaxbDataFormat(jaxbContext);
-
-                jaxb.setJaxbProviderProperties(Collections.singletonMap(Marshaller.JAXB_FORMATTED_OUTPUT, false));
-
-                from("direct:getPetById").to("petStore:getPetById").unmarshal(jaxb);
-            }
-        };
-    }
-
-    public static Iterable<String> knownProducers() {
-        final List<String> producers = new ArrayList<>(Arrays.asList(RestEndpoint.DEFAULT_REST_PRODUCER_COMPONENTS));
-        // skip http due security certificate testing problems
-        producers.remove("undertow");
-        producers.remove("vertx-http");
-        producers.remove("http");
-        return producers;
-    }
-
-    @BeforeAll
-    public static void setupStubs() throws IOException, URISyntaxException {
-        petstore.stubFor(get(urlEqualTo("/openapi.json")).willReturn(aResponse().withBody(
-                Files.readAllBytes(Paths.get(RestOpenApiGlobalHttpsTest.class.getResource("/openapi.json").toURI())))));
-
-        petstore.stubFor(
-                get(urlEqualTo("/v2/pet/14")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
-    }
-
-    static SSLContextParameters createHttpsParameters(final CamelContext camelContext) throws Exception {
-        final TrustManagersParameters trustManagerParameters = new TrustManagersParameters();
-        trustManagerParameters.setCamelContext(camelContext);
-        final TrustManagerFactory trustManagerFactory
-                = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-        final HttpsSettings httpsSettings = petstore.getOptions().httpsSettings();
-        final KeyStore trustStore = CertificateUtils.getKeyStore(Resource.newResource(httpsSettings.keyStorePath()),
-                httpsSettings.keyStoreType(), null, httpsSettings.keyStorePassword());
-        trustManagerFactory.init(trustStore);
-        final TrustManager trustManager = trustManagerFactory.getTrustManagers()[0];
-        trustManagerParameters.setTrustManager(trustManager);
-
-        final SSLContextParameters sslContextParameters = new SSLContextParameters();
-        sslContextParameters.setCamelContext(camelContext);
-        sslContextParameters.setTrustManagers(trustManagerParameters);
-        final CipherSuitesParameters cipherSuites = new CipherSuitesParameters();
-        cipherSuites.setCipherSuite(Collections.singletonList("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"));
-        sslContextParameters.setCipherSuites(cipherSuites);
-        sslContextParameters.setSecureSocketProtocol("TLSv1.3");
-        return sslContextParameters;
-    }
-
-}
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
index 9ad312ff2aa..3c2078401fe 100644
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
+++ b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/HttpsV3Test.java
@@ -166,7 +166,7 @@ public abstract class HttpsV3Test extends CamelTestSupport {
     @BeforeAll
     public static void setupStubs() throws IOException, URISyntaxException {
         petstore.stubFor(get(urlEqualTo("/openapi-v3.json")).willReturn(aResponse().withBody(
-                Files.readAllBytes(Paths.get(RestOpenApiGlobalHttpsTest.class.getResource("/openapi-v3.json").toURI())))));
+                Files.readAllBytes(Paths.get(RestOpenApiGlobalHttpsV3Test.class.getResource("/openapi-v3.json").toURI())))));
         petstore.stubFor(
                 get(urlEqualTo("/api/v3/pet/14")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
                         "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
deleted file mode 100644
index 2d6d6f11d12..00000000000
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentTest.java
+++ /dev/null
@@ -1,299 +0,0 @@
-/*
- * 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.rest.openapi;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import jakarta.xml.bind.JAXBContext;
-import jakarta.xml.bind.Marshaller;
-
-import com.github.tomakehurst.wiremock.WireMockServer;
-import org.apache.camel.CamelContext;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.rest.RestEndpoint;
-import org.apache.camel.converter.jaxb.JaxbDataFormat;
-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.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-import org.junit.jupiter.params.provider.ValueSource;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
-import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class RestOpenApiComponentTest extends CamelTestSupport {
-
-    public static WireMockServer petstore = new WireMockServer(wireMockConfig().dynamicPort());
-
-    static final Object NO_BODY = null;
-
-    public String componentName;
-
-    @BeforeAll
-    public static void startWireMockServer() {
-        petstore.start();
-    }
-
-    @AfterAll
-    public static void stopWireMockServer() {
-        petstore.stop();
-    }
-
-    @Override
-    public void setUp() {
-    }
-
-    @BeforeEach
-    public void resetWireMock() {
-        petstore.resetRequests();
-    }
-
-    public void doSetUp(String componentName) throws Exception {
-        this.componentName = componentName;
-        super.setUp();
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeAddingPets(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = new Pet();
-        pet.setName("Jean-Luc Picard");
-
-        final Pet created = template.requestBody("direct:addPet", pet, Pet.class);
-
-        assertNotNull(created);
-
-        assertEquals(14, created.getId());
-
-        petstore.verify(
-                postRequestedFor(urlEqualTo("/v2/pet"))
-                        // Swagger V2 converted to V3 ignores "produces" if there is no associated response schema
-                        //.withHeader("Accept", equalTo("application/xml, application/json"))
-                        .withHeader("Content-Type", equalTo("application/xml")));
-    }
-
-    @ParameterizedTest
-    @ValueSource(strings = { "Classpath", "Bean", "File" })
-    public void shouldBeAddingPetsDifferentLookup(String startPath) throws Exception {
-        doSetUp("http");
-
-        final Pet pet = new Pet();
-        pet.setName("Jean-Luc Picard");
-
-        final Pet created = template.requestBody("direct:addPetVia" + startPath, pet, Pet.class);
-
-        assertNotNull(created);
-
-        assertEquals(14, created.getId());
-
-        petstore.verify(
-                postRequestedFor(urlEqualTo("/v2/pet"))
-                        // Swagger V2 converted to V3 ignores "produces" if there is no associated response schema
-                        //.withHeader("Accept", equalTo("application/xml, application/json"))
-                        .withHeader("Content-Type", equalTo("application/xml")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsById(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = template.requestBodyAndHeader("direct:getPetById", NO_BODY, "petId", 14, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdSpecifiedInEndpointParameters(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = template.requestBody("direct:getPetByIdWithEndpointParams", NO_BODY, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdWithApiKeysInHeader(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Map<String, Object> headers = new HashMap<>();
-        headers.put("petId", 14);
-        headers.put("api_key", "dolphins");
-        final Pet pet = template.requestBodyAndHeaders("direct:getPetById", NO_BODY, headers, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(
-                getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept", equalTo("application/xml, application/json"))
-                        .withHeader("api_key", equalTo("dolphins")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdWithApiKeysInQueryParameter(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Map<String, Object> headers = new HashMap<>();
-        headers.put("petId", 14);
-        headers.put("api_key", "dolphins");
-        final Pet pet = template.requestBodyAndHeaders("altPetStore:getPetById", NO_BODY, headers, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14?api_key=dolphins")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByStatus(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pets pets = template.requestBodyAndHeader("direct:findPetsByStatus", NO_BODY, "status", "available",
-                Pets.class);
-
-        assertNotNull(pets);
-        assertNotNull(pets.pets);
-        assertEquals(2, pets.pets.size());
-
-        petstore.verify(
-                getRequestedFor(urlPathEqualTo("/v2/pet/findByStatus")).withQueryParam("status", equalTo("available"))
-                        .withHeader("Accept", equalTo("application/xml, application/json")));
-    }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext camelContext = super.createCamelContext();
-
-        final RestOpenApiComponent component = new RestOpenApiComponent();
-        component.setComponentName(componentName);
-        component.setHost("http://localhost:" + petstore.port());
-
-        camelContext.addComponent("petStore", component);
-
-        final RestOpenApiComponent altPetStore = new RestOpenApiComponent();
-        altPetStore.setComponentName(componentName);
-        altPetStore.setHost("http://localhost:" + petstore.port());
-        altPetStore.setSpecificationUri(RestOpenApiComponentTest.class.getResource("/alt-petstore.json").toURI());
-
-        camelContext.addComponent("altPetStore", altPetStore);
-
-        camelContext.getRegistry().bind("openapiBean", new RestOpenApiBean());
-
-        return camelContext;
-    }
-
-    @Override
-    protected RoutesBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                final JAXBContext jaxbContext = JAXBContext.newInstance(Pet.class, Pets.class);
-
-                final JaxbDataFormat jaxb = new JaxbDataFormat(jaxbContext);
-
-                jaxb.setJaxbProviderProperties(Collections.singletonMap(Marshaller.JAXB_FORMATTED_OUTPUT, false));
-
-                from("direct:getPetById").to("petStore:getPetById").unmarshal(jaxb);
-
-                from("direct:getPetByIdWithEndpointParams").to("petStore:getPetById?petId=14").unmarshal(jaxb);
-
-                from("direct:addPet").marshal(jaxb).to("petStore:addPet?specificationUri=classpath:openapi.json")
-                        .unmarshal(jaxb);
-                from("direct:addPetViaClasspath").marshal(jaxb).to("petStore:addPet?specificationUri=classpath:openapi.json")
-                        .unmarshal(jaxb);
-                from("direct:addPetViaBean").marshal(jaxb)
-                        .to("petStore:addPet?specificationUri=bean:openapiBean.getOpenApiJson").unmarshal(jaxb);
-                from("direct:addPetViaFile").marshal(jaxb)
-                        .to("petStore:addPet?specificationUri=file:target/test-classes/openapi.json").unmarshal(jaxb);
-
-                from("direct:findPetsByStatus").to("petStore:findPetsByStatus").unmarshal(jaxb);
-            }
-        };
-    }
-
-    public static Iterable<String> knownProducers() {
-        return Arrays.asList(RestEndpoint.DEFAULT_REST_PRODUCER_COMPONENTS);
-    }
-
-    @BeforeAll
-    public static void setupStubs() throws IOException, URISyntaxException {
-        petstore.stubFor(get(urlEqualTo("/openapi.json")).willReturn(aResponse().withBody(
-                Files.readAllBytes(Paths.get(RestOpenApiComponentTest.class.getResource("/openapi.json").toURI())))));
-
-        petstore.stubFor(post(urlEqualTo("/v2/pet"))
-                .withRequestBody(equalTo(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><name>Jean-Luc Picard</name></Pet>"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_CREATED)
-                        .withBody("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id></Pet>")));
-
-        petstore.stubFor(
-                get(urlEqualTo("/v2/pet/14")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
-
-        petstore.stubFor(get(urlPathEqualTo("/v2/pet/findByStatus")).withQueryParam("status", equalTo("available"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><pets><Pet><id>1</id><name>Olafur Eliason Arnalds</name></Pet><Pet><name>Jean-Luc Picard</name></Pet></pets>")));
-
-        petstore.stubFor(get(urlEqualTo("/v2/pet/14?api_key=dolphins"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
-    }
-
-}
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentYamlTest.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentYamlTest.java
deleted file mode 100644
index 4156a57cd8f..00000000000
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiComponentYamlTest.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * 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.rest.openapi;
-
-import java.io.IOException;
-import java.net.HttpURLConnection;
-import java.net.URISyntaxException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import jakarta.xml.bind.JAXBContext;
-import jakarta.xml.bind.Marshaller;
-
-import com.github.tomakehurst.wiremock.WireMockServer;
-import org.apache.camel.CamelContext;
-import org.apache.camel.RoutesBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.rest.RestEndpoint;
-import org.apache.camel.converter.jaxb.JaxbDataFormat;
-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.params.ParameterizedTest;
-import org.junit.jupiter.params.provider.MethodSource;
-
-import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
-import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.get;
-import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.post;
-import static com.github.tomakehurst.wiremock.client.WireMock.postRequestedFor;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlEqualTo;
-import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
-import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
-
-public class RestOpenApiComponentYamlTest extends CamelTestSupport {
-
-    public static WireMockServer petstore = new WireMockServer(wireMockConfig().dynamicPort());
-
-    static final Object NO_BODY = null;
-
-    public String componentName;
-
-    @BeforeAll
-    public static void startWireMockServer() {
-        petstore.start();
-    }
-
-    @AfterAll
-    public static void stopWireMockServer() {
-        petstore.stop();
-    }
-
-    @Override
-    public void setUp() {
-    }
-
-    @BeforeEach
-    public void resetWireMock() {
-        petstore.resetRequests();
-    }
-
-    public void doSetUp(String componentName) throws Exception {
-        this.componentName = componentName;
-        super.setUp();
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeAddingPets(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = new Pet();
-        pet.setName("Jean-Luc Picard");
-
-        final Pet created = template.requestBody("direct:addPet", pet, Pet.class);
-
-        assertNotNull(created);
-
-        assertEquals(14, created.getId());
-
-        petstore.verify(
-                postRequestedFor(urlEqualTo("/v2/pet"))
-                        // Swagger V2 converted to V3 ignores "produces" if there is no associated response schema
-                        //.withHeader("Accept", equalTo("application/xml, application/json"))
-                        .withHeader("Content-Type", equalTo("application/xml")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsById(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = template.requestBodyAndHeader("direct:getPetById", NO_BODY, "petId", 14, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdSpecifiedInEndpointParameters(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pet pet = template.requestBody("direct:getPetByIdWithEndpointParams", NO_BODY, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdWithApiKeysInHeader(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Map<String, Object> headers = new HashMap<>();
-        headers.put("petId", 14);
-        headers.put("api_key", "dolphins");
-        final Pet pet = template.requestBodyAndHeaders("direct:getPetById", NO_BODY, headers, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(
-                getRequestedFor(urlEqualTo("/v2/pet/14")).withHeader("Accept", equalTo("application/xml, application/json"))
-                        .withHeader("api_key", equalTo("dolphins")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByIdWithApiKeysInQueryParameter(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Map<String, Object> headers = new HashMap<>();
-        headers.put("petId", 14);
-        headers.put("api_key", "dolphins");
-        final Pet pet = template.requestBodyAndHeaders("altPetStore:getPetById", NO_BODY, headers, Pet.class);
-
-        assertNotNull(pet);
-
-        assertEquals(14, pet.getId());
-        assertEquals("Olafur Eliason Arnalds", pet.getName());
-
-        petstore.verify(getRequestedFor(urlEqualTo("/v2/pet/14?api_key=dolphins")).withHeader("Accept",
-                equalTo("application/xml, application/json")));
-    }
-
-    @ParameterizedTest
-    @MethodSource("knownProducers")
-    public void shouldBeGettingPetsByStatus(String componentName) throws Exception {
-        doSetUp(componentName);
-
-        final Pets pets = template.requestBodyAndHeader("direct:findPetsByStatus", NO_BODY, "status", "available",
-                Pets.class);
-
-        assertNotNull(pets);
-        assertNotNull(pets.pets);
-        assertEquals(2, pets.pets.size());
-
-        petstore.verify(
-                getRequestedFor(urlPathEqualTo("/v2/pet/findByStatus")).withQueryParam("status", equalTo("available"))
-                        .withHeader("Accept", equalTo("application/xml, application/json")));
-    }
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext camelContext = super.createCamelContext();
-
-        final RestOpenApiComponent component = new RestOpenApiComponent();
-        component.setComponentName(componentName);
-        component.setHost("http://localhost:" + petstore.port());
-        component.setSpecificationUri(RestOpenApiComponentYamlTest.class.getResource("/openapi.yaml").toURI());
-
-        camelContext.addComponent("petStore", component);
-
-        final RestOpenApiComponent altPetStore = new RestOpenApiComponent();
-        altPetStore.setComponentName(componentName);
-        altPetStore.setHost("http://localhost:" + petstore.port());
-        altPetStore.setSpecificationUri(RestOpenApiComponentYamlTest.class.getResource("/alt-petstore.yaml").toURI());
-
-        camelContext.addComponent("altPetStore", altPetStore);
-
-        return camelContext;
-    }
-
-    @Override
-    protected RoutesBuilder createRouteBuilder() {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                final JAXBContext jaxbContext = JAXBContext.newInstance(Pet.class, Pets.class);
-
-                final JaxbDataFormat jaxb = new JaxbDataFormat(jaxbContext);
-
-                jaxb.setJaxbProviderProperties(Collections.singletonMap(Marshaller.JAXB_FORMATTED_OUTPUT, false));
-
-                from("direct:getPetById").to("petStore:getPetById").unmarshal(jaxb);
-
-                from("direct:getPetByIdWithEndpointParams").to("petStore:getPetById?petId=14").unmarshal(jaxb);
-
-                from("direct:addPet").marshal(jaxb).to("petStore:addPet").unmarshal(jaxb);
-
-                from("direct:findPetsByStatus").to("petStore:findPetsByStatus").unmarshal(jaxb);
-            }
-        };
-    }
-
-    public static Iterable<String> knownProducers() {
-        return Arrays.asList(RestEndpoint.DEFAULT_REST_PRODUCER_COMPONENTS);
-    }
-
-    @BeforeAll
-    public static void setupStubs() throws IOException, URISyntaxException {
-        petstore.stubFor(get(urlEqualTo("/openapi.yaml")).willReturn(aResponse().withBody(
-                Files.readAllBytes(Paths.get(RestOpenApiComponentYamlTest.class.getResource("/openapi.yaml").toURI())))));
-
-        petstore.stubFor(post(urlEqualTo("/v2/pet"))
-                .withRequestBody(equalTo(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><name>Jean-Luc Picard</name></Pet>"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_CREATED)
-                        .withBody("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id></Pet>")));
-
-        petstore.stubFor(
-                get(urlEqualTo("/v2/pet/14")).willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
-
-        petstore.stubFor(get(urlPathEqualTo("/v2/pet/findByStatus")).withQueryParam("status", equalTo("available"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><pets><Pet><id>1</id><name>Olafur Eliason Arnalds</name></Pet><Pet><name>Jean-Luc Picard</name></Pet></pets>")));
-
-        petstore.stubFor(get(urlEqualTo("/v2/pet/14?api_key=dolphins"))
-                .willReturn(aResponse().withStatus(HttpURLConnection.HTTP_OK).withBody(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Pet><id>14</id><name>Olafur Eliason Arnalds</name></Pet>")));
-    }
-
-}
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiDelegateHttpsTest.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiDelegateHttpsTest.java
deleted file mode 100644
index 6bd4da5204c..00000000000
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiDelegateHttpsTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.rest.openapi;
-
-import org.apache.camel.CamelContext;
-import org.apache.camel.Component;
-import org.apache.camel.support.PluginHelper;
-import org.apache.camel.support.PropertyBindingSupport;
-
-public class RestOpenApiDelegateHttpsTest extends HttpsTest {
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        final CamelContext camelContext = super.createCamelContext();
-
-        // since camel context is not started, then we need to manually initialize the delegate
-        final Component delegate = PluginHelper.getComponentResolver(camelContext)
-                .resolveComponent(componentName, camelContext);
-        delegate.setCamelContext(camelContext);
-        delegate.init();
-
-        // and configure the ssl context parameters via binding
-        new PropertyBindingSupport.Builder()
-                .withCamelContext(camelContext)
-                .withProperty("sslContextParameters", createHttpsParameters(camelContext))
-                .withTarget(delegate)
-                .withConfigurer(delegate.getComponentPropertyConfigurer())
-                .bind();
-        camelContext.addComponent(componentName, delegate);
-
-        return camelContext;
-    }
-
-}
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsTest.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsTest.java
deleted file mode 100644
index 064b0cb701d..00000000000
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * 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.rest.openapi;
-
-import org.apache.camel.CamelContext;
-
-public class RestOpenApiGlobalHttpsTest extends HttpsTest {
-
-    @Override
-    protected CamelContext createCamelContext() throws Exception {
-        CamelContext camelContext = super.createCamelContext();
-        camelContext.setSSLContextParameters(createHttpsParameters(camelContext));
-
-        RestOpenApiComponent component = camelContext.getComponent("petStore", RestOpenApiComponent.class);
-        component.setUseGlobalSslContextParameters(true);
-
-        return camelContext;
-    }
-}
diff --git a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsV31Test.java b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsV31Test.java
index 88888a52bf3..50acc2d2213 100644
--- a/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsV31Test.java
+++ b/components/camel-rest-openapi/src/test/java/org/apache/camel/component/rest/openapi/RestOpenApiGlobalHttpsV31Test.java
@@ -34,7 +34,7 @@ public class RestOpenApiGlobalHttpsV31Test extends HttpsV3Test {
     public static void setupStubForSpec() throws IOException, URISyntaxException {
         petstore.stubFor(get(urlEqualTo("/petstore-3.1-ssl.yaml")).willReturn(aResponse().withBody(
                 Files.readAllBytes(
-                        Paths.get(RestOpenApiGlobalHttpsTest.class.getResource("/petstore-3.1-ssl.yaml").toURI())))));
+                        Paths.get(RestOpenApiGlobalHttpsV3Test.class.getResource("/petstore-3.1-ssl.yaml").toURI())))));
     }
 
     @Override
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 369ead0a0ca..82593e6c461 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
@@ -78,10 +78,8 @@ public class RestOpenApiRequestValidationTest extends CamelTestSupport {
     @BeforeAll
     public static void startWireMockServer() throws Exception {
         wireMockServer.start();
-        setUpPetStoreStubs("/openapi.json", "/v2/pet");
         setUpPetStoreStubs("/openapi-v3.json", "/api/v3/pet");
         setUpPetStoreStubs("/petstore-3.1.yaml", "/api/v31/pet");
-        setUpFruitsApiStubs("/fruits-2.0.yaml");
         setUpFruitsApiStubs("/fruits-3.0.yaml");
     }
 
@@ -348,7 +346,7 @@ public class RestOpenApiRequestValidationTest extends CamelTestSupport {
     }
 
     @ParameterizedTest
-    @ValueSource(strings = { "petStoreV2", "petStoreV3" })
+    @ValueSource(strings = { "petStoreV3" })
     void requestValidationWithBinaryBody(String petStoreVersion) throws IOException {
         Map<String, Object> headers = Map.of(
                 "petId", 1,
@@ -460,10 +458,8 @@ public class RestOpenApiRequestValidationTest extends CamelTestSupport {
     @Override
     protected CamelContext createCamelContext() throws Exception {
         CamelContext camelContext = super.createCamelContext();
-        camelContext.addComponent("petStoreV2", createRestOpenApiComponent("openapi.json"));
         camelContext.addComponent("petStoreV3", createRestOpenApiComponent("openapi-v3.json"));
         camelContext.addComponent("petStoreV31", createRestOpenApiComponent("petstore-3.1.yaml"));
-        camelContext.addComponent("fruitsV2", createRestOpenApiComponent("fruits-2.0.yaml"));
         camelContext.addComponent("fruitsV3", createRestOpenApiComponent("fruits-3.0.yaml"));
         camelContext.getGlobalOptions().put("CamelJacksonEnableTypeConverter", "true");
         camelContext.getGlobalOptions().put("CamelJacksonTypeConverterToPojo", "true");
@@ -471,11 +467,11 @@ public class RestOpenApiRequestValidationTest extends CamelTestSupport {
     }
 
     public static Iterable<String> petStoreVersions() {
-        return List.of("petStoreV2", "petStoreV3", "petStoreV31");
+        return List.of("petStoreV3", "petStoreV31");
     }
 
     public static Iterable<String> fruitsApiVersions() {
-        return List.of("fruitsV2", "fruitsV3");
+        return List.of("fruitsV3");
     }
 
     @Override
diff --git a/components/camel-rest-openapi/src/test/resources/alt-petstore.json b/components/camel-rest-openapi/src/test/resources/alt-petstore.json
deleted file mode 100644
index 12cd770dfbb..00000000000
--- a/components/camel-rest-openapi/src/test/resources/alt-petstore.json
+++ /dev/null
@@ -1,1039 +0,0 @@
-{
-    "swagger": "2.0",
-    "info": {
-        "description": "This is a sample server Petstore server.  You can find out more about OpenApi at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.",
-        "version": "1.0.0",
-        "title": "OpenApi Petstore",
-        "termsOfService": "http://swagger.io/terms/",
-        "contact": {
-            "email": "apiteam@swagger.io"
-        },
-        "license": {
-            "name": "Apache 2.0",
-            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
-        }
-    },
-    "host": "petstore.swagger.io",
-    "basePath": "/v2",
-    "tags": [
-        {
-            "name": "pet",
-            "description": "Everything about your Pets",
-            "externalDocs": {
-                "description": "Find out more",
-                "url": "http://swagger.io"
-            }
-        },
-        {
-            "name": "store",
-            "description": "Access to Petstore orders"
-        },
-        {
-            "name": "user",
-            "description": "Operations about user",
-            "externalDocs": {
-                "description": "Find out more about our store",
-                "url": "http://swagger.io"
-            }
-        }
-    ],
-    "schemes": [
-        "http"
-    ],
-    "paths": {
-        "/pet": {
-            "post": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Add a new pet to the store",
-                "description": "",
-                "operationId": "addPet",
-                "consumes": [
-                    "application/json",
-                    "application/xml"
-                ],
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "Pet object that needs to be added to the store",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/Pet"
-                        }
-                    }
-                ],
-                "responses": {
-                    "405": {
-                        "description": "Invalid input"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            },
-            "put": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Update an existing pet",
-                "description": "",
-                "operationId": "updatePet",
-                "consumes": [
-                    "application/json",
-                    "application/xml"
-                ],
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "Pet object that needs to be added to the store",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/Pet"
-                        }
-                    }
-                ],
-                "responses": {
-                    "400": {
-                        "description": "Invalid ID supplied"
-                    },
-                    "404": {
-                        "description": "Pet not found"
-                    },
-                    "405": {
-                        "description": "Validation exception"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            }
-        },
-        "/pet/findByStatus": {
-            "get": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Finds Pets by status",
-                "description": "Multiple status values can be provided with comma separated strings",
-                "operationId": "findPetsByStatus",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "status",
-                        "in": "query",
-                        "description": "Status values that need to be considered for filter",
-                        "required": true,
-                        "type": "array",
-                        "items": {
-                            "type": "string",
-                            "enum": [
-                                "available",
-                                "pending",
-                                "sold"
-                            ],
-                            "default": "available"
-                        },
-                        "collectionFormat": "multi"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/Pet"
-                            }
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid status value"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            }
-        },
-        "/pet/findByTags": {
-            "get": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Finds Pets by tags",
-                "description": "Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.",
-                "operationId": "findPetsByTags",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "tags",
-                        "in": "query",
-                        "description": "Tags to filter by",
-                        "required": true,
-                        "type": "array",
-                        "items": {
-                            "type": "string"
-                        },
-                        "collectionFormat": "multi"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/Pet"
-                            }
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid tag value"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ],
-                "deprecated": true
-            }
-        },
-        "/pet/{petId}": {
-            "get": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Find pet by ID",
-                "description": "Returns a single pet",
-                "operationId": "getPetById",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "petId",
-                        "in": "path",
-                        "description": "ID of pet to return",
-                        "required": true,
-                        "type": "integer",
-                        "format": "int64"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "$ref": "#/definitions/Pet"
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid ID supplied"
-                    },
-                    "404": {
-                        "description": "Pet not found"
-                    }
-                },
-                "security": [
-                    {
-                        "api_key": [
-                        ]
-                    }
-                ]
-            },
-            "post": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Updates a pet in the store with form data",
-                "description": "",
-                "operationId": "updatePetWithForm",
-                "consumes": [
-                    "application/x-www-form-urlencoded"
-                ],
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "petId",
-                        "in": "path",
-                        "description": "ID of pet that needs to be updated",
-                        "required": true,
-                        "type": "integer",
-                        "format": "int64"
-                    },
-                    {
-                        "name": "name",
-                        "in": "formData",
-                        "description": "Updated name of the pet",
-                        "required": false,
-                        "type": "string"
-                    },
-                    {
-                        "name": "status",
-                        "in": "formData",
-                        "description": "Updated status of the pet",
-                        "required": false,
-                        "type": "string"
-                    }
-                ],
-                "responses": {
-                    "405": {
-                        "description": "Invalid input"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            },
-            "delete": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "Deletes a pet",
-                "description": "",
-                "operationId": "deletePet",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "api_key",
-                        "in": "header",
-                        "required": false,
-                        "type": "string"
-                    },
-                    {
-                        "name": "petId",
-                        "in": "path",
-                        "description": "Pet id to delete",
-                        "required": true,
-                        "type": "integer",
-                        "format": "int64"
-                    }
-                ],
-                "responses": {
-                    "400": {
-                        "description": "Invalid ID supplied"
-                    },
-                    "404": {
-                        "description": "Pet not found"
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            }
-        },
-        "/pet/{petId}/uploadImage": {
-            "post": {
-                "tags": [
-                    "pet"
-                ],
-                "summary": "uploads an image",
-                "description": "",
-                "operationId": "uploadFile",
-                "consumes": [
-                    "multipart/form-data"
-                ],
-                "produces": [
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "petId",
-                        "in": "path",
-                        "description": "ID of pet to update",
-                        "required": true,
-                        "type": "integer",
-                        "format": "int64"
-                    },
-                    {
-                        "name": "additionalMetadata",
-                        "in": "formData",
-                        "description": "Additional data to pass to server",
-                        "required": false,
-                        "type": "string"
-                    },
-                    {
-                        "name": "file",
-                        "in": "formData",
-                        "description": "file to upload",
-                        "required": false,
-                        "type": "file"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "$ref": "#/definitions/ApiResponse"
-                        }
-                    }
-                },
-                "security": [
-                    {
-                        "petstore_auth": [
-                            "write:pets",
-                            "read:pets"
-                        ]
-                    }
-                ]
-            }
-        },
-        "/store/inventory": {
-            "get": {
-                "tags": [
-                    "store"
-                ],
-                "summary": "Returns pet inventories by status",
-                "description": "Returns a map of status codes to quantities",
-                "operationId": "getInventory",
-                "produces": [
-                    "application/json"
-                ],
-                "parameters": [
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "type": "object",
-                            "additionalProperties": {
-                                "type": "integer",
-                                "format": "int32"
-                            }
-                        }
-                    }
-                },
-                "security": [
-                    {
-                        "api_key": [
-                        ]
-                    }
-                ]
-            }
-        },
-        "/store/order": {
-            "post": {
-                "tags": [
-                    "store"
-                ],
-                "summary": "Place an order for a pet",
-                "description": "",
-                "operationId": "placeOrder",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "order placed for purchasing the pet",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/Order"
-                        }
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "$ref": "#/definitions/Order"
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid Order"
-                    }
-                }
-            }
-        },
-        "/store/order/{orderId}": {
-            "get": {
-                "tags": [
-                    "store"
-                ],
-                "summary": "Find purchase order by ID",
-                "description": "For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions",
-                "operationId": "getOrderById",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "orderId",
-                        "in": "path",
-                        "description": "ID of pet that needs to be fetched",
-                        "required": true,
-                        "type": "integer",
-                        "maximum": 10.0,
-                        "minimum": 1.0,
-                        "format": "int64"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "$ref": "#/definitions/Order"
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid ID supplied"
-                    },
-                    "404": {
-                        "description": "Order not found"
-                    }
-                }
-            },
-            "delete": {
-                "tags": [
-                    "store"
-                ],
-                "summary": "Delete purchase order by ID",
-                "description": "For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors",
-                "operationId": "deleteOrder",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "orderId",
-                        "in": "path",
-                        "description": "ID of the order that needs to be deleted",
-                        "required": true,
-                        "type": "integer",
-                        "minimum": 1.0,
-                        "format": "int64"
-                    }
-                ],
-                "responses": {
-                    "400": {
-                        "description": "Invalid ID supplied"
-                    },
-                    "404": {
-                        "description": "Order not found"
-                    }
-                }
-            }
-        },
-        "/user": {
-            "post": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Create user",
-                "description": "This can only be done by the logged in user.",
-                "operationId": "createUser",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "Created user object",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/User"
-                        }
-                    }
-                ],
-                "responses": {
-                    "default": {
-                        "description": "successful operation"
-                    }
-                }
-            }
-        },
-        "/user/createWithArray": {
-            "post": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Creates list of users with given input array",
-                "description": "",
-                "operationId": "createUsersWithArrayInput",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "List of user object",
-                        "required": true,
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/User"
-                            }
-                        }
-                    }
-                ],
-                "responses": {
-                    "default": {
-                        "description": "successful operation"
-                    }
-                }
-            }
-        },
-        "/user/createWithList": {
-            "post": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Creates list of users with given input array",
-                "description": "",
-                "operationId": "createUsersWithListInput",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "List of user object",
-                        "required": true,
-                        "schema": {
-                            "type": "array",
-                            "items": {
-                                "$ref": "#/definitions/User"
-                            }
-                        }
-                    }
-                ],
-                "responses": {
-                    "default": {
-                        "description": "successful operation"
-                    }
-                }
-            }
-        },
-        "/user/login": {
-            "get": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Logs user into the system",
-                "description": "",
-                "operationId": "loginUser",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "username",
-                        "in": "query",
-                        "description": "The user name for login",
-                        "required": true,
-                        "type": "string"
-                    },
-                    {
-                        "name": "password",
-                        "in": "query",
-                        "description": "The password for login in clear text",
-                        "required": true,
-                        "type": "string"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "type": "string"
-                        },
-                        "headers": {
-                            "X-Rate-Limit": {
-                                "type": "integer",
-                                "format": "int32",
-                                "description": "calls per hour allowed by the user"
-                            },
-                            "X-Expires-After": {
-                                "type": "string",
-                                "format": "date-time",
-                                "description": "date in UTC when token expires"
-                            }
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid username/password supplied"
-                    }
-                }
-            }
-        },
-        "/user/logout": {
-            "get": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Logs out current logged in user session",
-                "description": "",
-                "operationId": "logoutUser",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                ],
-                "responses": {
-                    "default": {
-                        "description": "successful operation"
-                    }
-                }
-            }
-        },
-        "/user/{username}": {
-            "get": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Get user by user name",
-                "description": "",
-                "operationId": "getUserByName",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "username",
-                        "in": "path",
-                        "description": "The name that needs to be fetched. Use user1 for testing. ",
-                        "required": true,
-                        "type": "string"
-                    }
-                ],
-                "responses": {
-                    "200": {
-                        "description": "successful operation",
-                        "schema": {
-                            "$ref": "#/definitions/User"
-                        }
-                    },
-                    "400": {
-                        "description": "Invalid username supplied"
-                    },
-                    "404": {
-                        "description": "User not found"
-                    }
-                }
-            },
-            "put": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Updated user",
-                "description": "This can only be done by the logged in user.",
-                "operationId": "updateUser",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "username",
-                        "in": "path",
-                        "description": "name that need to be updated",
-                        "required": true,
-                        "type": "string"
-                    },
-                    {
-                        "in": "body",
-                        "name": "body",
-                        "description": "Updated user object",
-                        "required": true,
-                        "schema": {
-                            "$ref": "#/definitions/User"
-                        }
-                    }
-                ],
-                "responses": {
-                    "400": {
-                        "description": "Invalid user supplied"
-                    },
-                    "404": {
-                        "description": "User not found"
-                    }
-                }
-            },
-            "delete": {
-                "tags": [
-                    "user"
-                ],
-                "summary": "Delete user",
-                "description": "This can only be done by the logged in user.",
-                "operationId": "deleteUser",
-                "produces": [
-                    "application/xml",
-                    "application/json"
-                ],
-                "parameters": [
-                    {
-                        "name": "username",
-                        "in": "path",
-                        "description": "The name that needs to be deleted",
-                        "required": true,
-                        "type": "string"
-                    }
-                ],
-                "responses": {
-                    "400": {
-                        "description": "Invalid username supplied"
-                    },
-                    "404": {
-                        "description": "User not found"
-                    }
-                }
-            }
-        }
-    },
-    "securityDefinitions": {
-        "petstore_auth": {
-            "type": "oauth2",
-            "authorizationUrl": "http://petstore.swagger.io/oauth/dialog",
-            "flow": "implicit",
-            "scopes": {
-                "write:pets": "modify pets in your account",
-                "read:pets": "read your pets"
-            }
-        },
-        "api_key": {
-            "type": "apiKey",
-            "name": "api_key",
-            "in": "query"
-        }
-    },
-    "definitions": {
-        "Order": {
-            "type": "object",
-            "properties": {
-                "id": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "petId": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "quantity": {
-                    "type": "integer",
-                    "format": "int32"
-                },
-                "shipDate": {
-                    "type": "string",
-                    "format": "date-time"
-                },
-                "status": {
-                    "type": "string",
-                    "description": "Order Status",
-                    "enum": [
-                        "placed",
-                        "approved",
-                        "delivered"
-                    ]
-                },
-                "complete": {
-                    "type": "boolean",
-                    "default": false
-                }
-            },
-            "xml": {
-                "name": "Order"
-            }
-        },
-        "Category": {
-            "type": "object",
-            "properties": {
-                "id": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "name": {
-                    "type": "string"
-                }
-            },
-            "xml": {
-                "name": "Category"
-            }
-        },
-        "User": {
-            "type": "object",
-            "properties": {
-                "id": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "username": {
-                    "type": "string"
-                },
-                "firstName": {
-                    "type": "string"
-                },
-                "lastName": {
-                    "type": "string"
-                },
-                "email": {
-                    "type": "string"
-                },
-                "password": {
-                    "type": "string"
-                },
-                "phone": {
-                    "type": "string"
-                },
-                "userStatus": {
-                    "type": "integer",
-                    "format": "int32",
-                    "description": "User Status"
-                }
-            },
-            "xml": {
-                "name": "User"
-            }
-        },
-        "Tag": {
-            "type": "object",
-            "properties": {
-                "id": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "name": {
-                    "type": "string"
-                }
-            },
-            "xml": {
-                "name": "Tag"
-            }
-        },
-        "Pet": {
-            "type": "object",
-            "required": [
-                "name",
-                "photoUrls"
-            ],
-            "properties": {
-                "id": {
-                    "type": "integer",
-                    "format": "int64"
-                },
-                "category": {
-                    "$ref": "#/definitions/Category"
-                },
-                "name": {
-                    "type": "string",
-                    "example": "doggie"
-                },
-                "photoUrls": {
-                    "type": "array",
-                    "xml": {
-                        "name": "photoUrl",
-                        "wrapped": true
-                    },
-                    "items": {
-                        "type": "string"
-                    }
-                },
-                "tags": {
-                    "type": "array",
-                    "xml": {
-                        "name": "tag",
-                        "wrapped": true
-                    },
-                    "items": {
-                        "$ref": "#/definitions/Tag"
-                    }
-                },
-                "status": {
-                    "type": "string",
-                    "description": "pet status in the store",
-                    "enum": [
-                        "available",
-                        "pending",
-                        "sold"
-                    ]
-                }
-            },
-            "xml": {
-                "name": "Pet"
-            }
-        },
-        "ApiResponse": {
-            "type": "object",
-            "properties": {
-                "code": {
-                    "type": "integer",
-                    "format": "int32"
-                },
-                "type": {
-                    "type": "string"
-                },
-                "message": {
-                    "type": "string"
-                }
-            }
-        }
-    },
-    "externalDocs": {
-        "description": "Find out more about OpenApi",
-        "url": "http://swagger.io"
-    }
-}
diff --git a/components/camel-rest-openapi/src/test/resources/alt-petstore.yaml b/components/camel-rest-openapi/src/test/resources/alt-petstore.yaml
deleted file mode 100644
index 29275709223..00000000000
--- a/components/camel-rest-openapi/src/test/resources/alt-petstore.yaml
+++ /dev/null
@@ -1,716 +0,0 @@
-#
-# 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.
-#
-
-swagger: "2.0"
-info:
-  description: 'This is a sample server Petstore server.  You can find out more about OpenApi at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).  For this sample, you can use the api key `special-key` to test the authorization filters.'
-  version: 1.0.0
-  title: OpenApi Petstore
-  termsOfService: http://swagger.io/terms/
-  contact:
-    email: apiteam@swagger.io
-  license:
-    name: Apache 2.0
-    url: http://www.apache.org/licenses/LICENSE-2.0.html
-host: petstore.swagger.io
-basePath: /v2
-tags:
-  - name: pet
-    description: Everything about your Pets
-    externalDocs:
-      description: Find out more
-      url: http://swagger.io
-  - name: store
-    description: Access to Petstore orders
-  - name: user
-    description: Operations about user
-    externalDocs:
-      description: Find out more about our store
-      url: http://swagger.io
-schemes:
-  - http
-paths:
-  /pet:
-    post:
-      tags:
-        - pet
-      summary: Add a new pet to the store
-      description: ""
-      operationId: addPet
-      consumes:
-        - application/json
-        - application/xml
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: Pet object that needs to be added to the store
-          required: true
-          schema:
-            $ref: '#/definitions/Pet'
-      responses:
-        "405":
-          description: Invalid input
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-    put:
-      tags:
-        - pet
-      summary: Update an existing pet
-      description: ""
-      operationId: updatePet
-      consumes:
-        - application/json
-        - application/xml
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: Pet object that needs to be added to the store
-          required: true
-          schema:
-            $ref: '#/definitions/Pet'
-      responses:
-        "400":
-          description: Invalid ID supplied
-        "404":
-          description: Pet not found
-        "405":
-          description: Validation exception
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-  /pet/findByStatus:
-    get:
-      tags:
-        - pet
-      summary: Finds Pets by status
-      description: Multiple status values can be provided with comma separated strings
-      operationId: findPetsByStatus
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: status
-          in: query
-          description: Status values that need to be considered for filter
-          required: true
-          type: array
-          items:
-            type: string
-            enum:
-              - available
-              - pending
-              - sold
-            default: available
-          collectionFormat: multi
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            type: array
-            items:
-              $ref: '#/definitions/Pet'
-        "400":
-          description: Invalid status value
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-  /pet/findByTags:
-    get:
-      tags:
-        - pet
-      summary: Finds Pets by tags
-      description: Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-      operationId: findPetsByTags
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: tags
-          in: query
-          description: Tags to filter by
-          required: true
-          type: array
-          items:
-            type: string
-          collectionFormat: multi
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            type: array
-            items:
-              $ref: '#/definitions/Pet'
-        "400":
-          description: Invalid tag value
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-      deprecated: true
-  /pet/{petId}:
-    get:
-      tags:
-        - pet
-      summary: Find pet by ID
-      description: Returns a single pet
-      operationId: getPetById
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: petId
-          in: path
-          description: ID of pet to return
-          required: true
-          type: integer
-          format: int64
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            $ref: '#/definitions/Pet'
-        "400":
-          description: Invalid ID supplied
-        "404":
-          description: Pet not found
-      security:
-        - api_key: []
-    post:
-      tags:
-        - pet
-      summary: Updates a pet in the store with form data
-      description: ""
-      operationId: updatePetWithForm
-      consumes:
-        - application/x-www-form-urlencoded
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: petId
-          in: path
-          description: ID of pet that needs to be updated
-          required: true
-          type: integer
-          format: int64
-        - name: name
-          in: formData
-          description: Updated name of the pet
-          required: false
-          type: string
-        - name: status
-          in: formData
-          description: Updated status of the pet
-          required: false
-          type: string
-      responses:
-        "405":
-          description: Invalid input
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-    delete:
-      tags:
-        - pet
-      summary: Deletes a pet
-      description: ""
-      operationId: deletePet
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: api_key
-          in: header
-          required: false
-          type: string
-        - name: petId
-          in: path
-          description: Pet id to delete
-          required: true
-          type: integer
-          format: int64
-      responses:
-        "400":
-          description: Invalid ID supplied
-        "404":
-          description: Pet not found
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-  /pet/{petId}/uploadImage:
-    post:
-      tags:
-        - pet
-      summary: uploads an image
-      description: ""
-      operationId: uploadFile
-      consumes:
-        - multipart/form-data
-      produces:
-        - application/json
-      parameters:
-        - name: petId
-          in: path
-          description: ID of pet to update
-          required: true
-          type: integer
-          format: int64
-        - name: additionalMetadata
-          in: formData
-          description: Additional data to pass to server
-          required: false
-          type: string
-        - name: file
-          in: formData
-          description: file to upload
-          required: false
-          type: file
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            $ref: '#/definitions/ApiResponse'
-      security:
-        - petstore_auth:
-            - write:pets
-            - read:pets
-  /store/inventory:
-    get:
-      tags:
-        - store
-      summary: Returns pet inventories by status
-      description: Returns a map of status codes to quantities
-      operationId: getInventory
-      produces:
-        - application/json
-      parameters: []
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            type: object
-            additionalProperties:
-              type: integer
-              format: int32
-      security:
-        - api_key: []
-  /store/order:
-    post:
-      tags:
-        - store
-      summary: Place an order for a pet
-      description: ""
-      operationId: placeOrder
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: order placed for purchasing the pet
-          required: true
-          schema:
-            $ref: '#/definitions/Order'
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            $ref: '#/definitions/Order'
-        "400":
-          description: Invalid Order
-  /store/order/{orderId}:
-    get:
-      tags:
-        - store
-      summary: Find purchase order by ID
-      description: For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
-      operationId: getOrderById
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: orderId
-          in: path
-          description: ID of pet that needs to be fetched
-          required: true
-          type: integer
-          maximum: 10.0
-          minimum: 1.0
-          format: int64
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            $ref: '#/definitions/Order'
-        "400":
-          description: Invalid ID supplied
-        "404":
-          description: Order not found
-    delete:
-      tags:
-        - store
-      summary: Delete purchase order by ID
-      description: For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
-      operationId: deleteOrder
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: orderId
-          in: path
-          description: ID of the order that needs to be deleted
-          required: true
-          type: integer
-          minimum: 1.0
-          format: int64
-      responses:
-        "400":
-          description: Invalid ID supplied
-        "404":
-          description: Order not found
-  /user:
-    post:
-      tags:
-        - user
-      summary: Create user
-      description: This can only be done by the logged in user.
-      operationId: createUser
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: Created user object
-          required: true
-          schema:
-            $ref: '#/definitions/User'
-      responses:
-        default:
-          description: successful operation
-  /user/createWithArray:
-    post:
-      tags:
-        - user
-      summary: Creates list of users with given input array
-      description: ""
-      operationId: createUsersWithArrayInput
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: List of user object
-          required: true
-          schema:
-            type: array
-            items:
-              $ref: '#/definitions/User'
-      responses:
-        default:
-          description: successful operation
-  /user/createWithList:
-    post:
-      tags:
-        - user
-      summary: Creates list of users with given input array
-      description: ""
-      operationId: createUsersWithListInput
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          description: List of user object
-          required: true
-          schema:
-            type: array
-            items:
-              $ref: '#/definitions/User'
-      responses:
-        default:
-          description: successful operation
-  /user/login:
-    get:
-      tags:
-        - user
-      summary: Logs user into the system
-      description: ""
-      operationId: loginUser
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: username
-          in: query
-          description: The user name for login
-          required: true
-          type: string
-        - name: password
-          in: query
-          description: The password for login in clear text
-          required: true
-          type: string
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            type: string
-          headers:
-            X-Rate-Limit:
-              type: integer
-              format: int32
-              description: calls per hour allowed by the user
-            X-Expires-After:
-              type: string
-              format: date-time
-              description: date in UTC when token expires
-        "400":
-          description: Invalid username/password supplied
-  /user/logout:
-    get:
-      tags:
-        - user
-      summary: Logs out current logged in user session
-      description: ""
-      operationId: logoutUser
-      produces:
-        - application/xml
-        - application/json
-      parameters: []
-      responses:
-        default:
-          description: successful operation
-  /user/{username}:
-    get:
-      tags:
-        - user
-      summary: Get user by user name
-      description: ""
-      operationId: getUserByName
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: username
-          in: path
-          description: 'The name that needs to be fetched. Use user1 for testing. '
-          required: true
-          type: string
-      responses:
-        "200":
-          description: successful operation
-          schema:
-            $ref: '#/definitions/User'
-        "400":
-          description: Invalid username supplied
-        "404":
-          description: User not found
-    put:
-      tags:
-        - user
-      summary: Updated user
-      description: This can only be done by the logged in user.
-      operationId: updateUser
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: username
-          in: path
-          description: name that need to be updated
-          required: true
-          type: string
-        - in: body
-          name: body
-          description: Updated user object
-          required: true
-          schema:
-            $ref: '#/definitions/User'
-      responses:
-        "400":
-          description: Invalid user supplied
-        "404":
-          description: User not found
-    delete:
-      tags:
-        - user
-      summary: Delete user
-      description: This can only be done by the logged in user.
-      operationId: deleteUser
-      produces:
-        - application/xml
-        - application/json
-      parameters:
-        - name: username
-          in: path
-          description: The name that needs to be deleted
-          required: true
-          type: string
-      responses:
-        "400":
-          description: Invalid username supplied
-        "404":
-          description: User not found
-securityDefinitions:
-  petstore_auth:
-    type: oauth2
-    authorizationUrl: http://petstore.swagger.io/oauth/dialog
-    flow: implicit
-    scopes:
-      write:pets: modify pets in your account
-      read:pets: read your pets
-  api_key:
-    type: apiKey
-    name: api_key
-    in: query
-definitions:
-  Order:
-    type: object
-    properties:
-      id:
-        type: integer
-        format: int64
-      petId:
-        type: integer
-        format: int64
-      quantity:
-        type: integer
-        format: int32
-      shipDate:
-        type: string
-        format: date-time
-      status:
-        type: string
-        description: Order Status
-        enum:
-          - placed
-          - approved
-          - delivered
-      complete:
-        type: boolean
-        default: false
-    xml:
-      name: Order
-  Category:
-    type: object
-    properties:
-      id:
-        type: integer
-        format: int64
-      name:
-        type: string
-    xml:
-      name: Category
-  User:
-    type: object
-    properties:
-      id:
-        type: integer
-        format: int64
-      username:
-        type: string
-      firstName:
-        type: string
-      lastName:
-        type: string
-      email:
-        type: string
-      password:
-        type: string
-      phone:
-        type: string
-      userStatus:
-        type: integer
-        format: int32
-        description: User Status
-    xml:
-      name: User
-  Tag:
-    type: object
-    properties:
-      id:
-        type: integer
-        format: int64
-      name:
-        type: string
-    xml:
-      name: Tag
-  Pet:
-    type: object
-    required:
-      - name
-      - photoUrls
-    properties:
-      id:
-        type: integer
-        format: int64
-      category:
-        $ref: '#/definitions/Category'
-      name:
-        type: string
-        example: doggie
-      photoUrls:
-        type: array
-        xml:
-          name: photoUrl
-          wrapped: true
-        items:
-          type: string
-      tags:
-        type: array
-        xml:
-          name: tag
-          wrapped: true
-        items:
-          $ref: '#/definitions/Tag'
-      status:
-        type: string
-        description: pet status in the store
-        enum:
-          - available
-          - pending
-          - sold
-    xml:
-      name: Pet
-  ApiResponse:
-    type: object
-    properties:
-      code:
-        type: integer
-        format: int32
-      type:
-        type: string
-      message:
-        type: string
-externalDocs:
-  description: Find out more about OpenApi
-  url: http://swagger.io
diff --git a/components/camel-rest-openapi/src/test/resources/fruits-2.0.yaml b/components/camel-rest-openapi/src/test/resources/fruits-2.0.yaml
deleted file mode 100644
index b0b312fe869..00000000000
--- a/components/camel-rest-openapi/src/test/resources/fruits-2.0.yaml
+++ /dev/null
@@ -1,146 +0,0 @@
-#
-# 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.
-#
-
-swagger: '2.0'
-info:
-  title: Fruits API
-  version: 1.0.0
-paths:
-  /api/v1/fruit:
-    patch:
-      operationId: updateFruit
-      consumes:
-        - application/json
-      produces:
-        - application/json
-      parameters:
-        - in: body
-          name: body
-          schema:
-            $ref: '#/definitions/Fruit'
-      responses:
-        '200':
-          description: OK
-          schema:
-            $ref: '#/definitions/Fruit'
-      tags:
-        - Api Spec
-    post:
-      operationId: addFruit
-      consumes:
-        - application/json
-      produces:
-        - application/json
-      parameters:
-        - format: int32
-          in: query
-          name: id
-          type: integer
-        - in: body
-          name: body
-          schema:
-            $ref: '#/definitions/Fruit'
-      responses:
-        '200':
-          description: OK
-          schema:
-            $ref: '#/definitions/Fruit'
-      tags:
-        - Api Spec
-    delete:
-      operationId: deleteFruits
-      parameters:
-        - format: int32
-          in: query
-          name: id
-          required: true
-          type: array
-      responses:
-        '200':
-          description: OK
-      tags:
-        - Api Spec
-  /api/v1/fruit/form:
-    post:
-      operationId: addFruitFromForm
-      consumes:
-        - application/x-www-form-urlencoded
-      produces:
-        - application/json
-      parameters:
-        - in: formData
-          name: name
-          type: string
-        - in: formData
-          name: color
-          type: string
-      responses:
-        '200':
-          description: OK
-          schema:
-            $ref: '#/definitions/Fruit'
-      tags:
-        - Api Spec
-  '/api/v1/fruit/{id}':
-    delete:
-      operationId: deleteFruit
-      produces:
-        - application/json
-      parameters:
-        - format: int32
-          in: path
-          name: id
-          required: true
-          type: integer
-        - in: header
-          name: deletedBy
-          type: string
-        - in: header
-          name: deletionReason
-          required: true
-          type: array
-      responses:
-        '200':
-          description: OK
-          schema:
-            $ref: '#/definitions/Fruit'
-      tags:
-        - Api Spec
-definitions:
-  Fruit:
-    required:
-      - name
-      - color
-    properties:
-      color:
-        type: string
-      deletedBy:
-        type: string
-      deletionReason:
-        type: string
-      id:
-        format: int32
-        type: integer
-      name:
-        type: string
-    type: object
-securityDefinitions:
-  SecurityScheme:
-    description: Authentication
-    type: basic
-x-components: {}
-


(camel) 04/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit bdb5b01004adcaa7bc79648e93322ae0237b9869
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 09:37:41 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 .../org/apache/camel/catalog/components/rest-openapi.json     |  2 +-
 .../org/apache/camel/component/rest/openapi/rest-openapi.json |  2 +-
 .../src/main/docs/rest-openapi-component.adoc                 |  2 +-
 .../apache/camel/builder/endpoint/StaticEndpointBuilders.java |  6 ++----
 .../endpoint/dsl/RestOpenApiEndpointBuilderFactory.java       | 11 +++--------
 5 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
index 2bf53431873..ef8b4fcc110 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/rest-openapi.json
@@ -3,7 +3,7 @@
     "kind": "component",
     "name": "rest-openapi",
     "title": "REST OpenApi",
-    "description": "Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.",
+    "description": "To call REST services using OpenAPI specification as contract.",
     "deprecated": false,
     "firstVersion": "3.1.0",
     "label": "rest,api",
diff --git a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
index 2bf53431873..ef8b4fcc110 100644
--- a/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
+++ b/components/camel-rest-openapi/src/generated/resources/META-INF/org/apache/camel/component/rest/openapi/rest-openapi.json
@@ -3,7 +3,7 @@
     "kind": "component",
     "name": "rest-openapi",
     "title": "REST OpenApi",
-    "description": "Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.",
+    "description": "To call REST services using OpenAPI specification as contract.",
     "deprecated": false,
     "firstVersion": "3.1.0",
     "label": "rest,api",
diff --git a/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc b/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
index 903dab2155b..c580baafcd4 100644
--- a/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
+++ b/components/camel-rest-openapi/src/main/docs/rest-openapi-component.adoc
@@ -2,7 +2,7 @@
 :doctitle: REST OpenApi
 :shortname: rest-openapi
 :artifactid: camel-rest-openapi
-:description: Configure REST producers based on an OpenAPI specification document delegating to a component implementing the RestProducerFactory interface.
+:description: To call REST services using OpenAPI specification as contract.
 :since: 3.1
 :supportlevel: Stable
 :tabs-sync-option:
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 065f232b926..1ee97915462 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -12511,8 +12511,7 @@ public class StaticEndpointBuilders {
     }
     /**
      * REST OpenApi (camel-rest-openapi)
-     * Configure REST producers based on an OpenAPI specification document
-     * delegating to a component implementing the RestProducerFactory interface.
+     * To call REST services using OpenAPI specification as contract.
      * 
      * Category: rest,api
      * Since: 3.1
@@ -12549,8 +12548,7 @@ public class StaticEndpointBuilders {
     }
     /**
      * REST OpenApi (camel-rest-openapi)
-     * Configure REST producers based on an OpenAPI specification document
-     * delegating to a component implementing the RestProducerFactory interface.
+     * To call REST services using OpenAPI specification as contract.
      * 
      * Category: rest,api
      * Since: 3.1
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
index 9e9f8bf8a8d..d3568ea1644 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/RestOpenApiEndpointBuilderFactory.java
@@ -27,8 +27,7 @@ import org.apache.camel.builder.EndpointProducerBuilder;
 import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
 
 /**
- * Configure REST producers based on an OpenAPI specification document
- * delegating to a component implementing the RestProducerFactory interface.
+ * To call REST services using OpenAPI specification as contract.
  * 
  * Generated by camel build tools - do NOT edit this file!
  */
@@ -319,9 +318,7 @@ public interface RestOpenApiEndpointBuilderFactory {
     public interface RestOpenApiBuilders {
         /**
          * REST OpenApi (camel-rest-openapi)
-         * Configure REST producers based on an OpenAPI specification document
-         * delegating to a component implementing the RestProducerFactory
-         * interface.
+         * To call REST services using OpenAPI specification as contract.
          * 
          * Category: rest,api
          * Since: 3.1
@@ -357,9 +354,7 @@ public interface RestOpenApiEndpointBuilderFactory {
         }
         /**
          * REST OpenApi (camel-rest-openapi)
-         * Configure REST producers based on an OpenAPI specification document
-         * delegating to a component implementing the RestProducerFactory
-         * interface.
+         * To call REST services using OpenAPI specification as contract.
          * 
          * Category: rest,api
          * Since: 3.1


(camel) 03/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit ecb8c4957327cea34e4c0d511b01b915cdc8d888
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 09:35:44 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 .../component/rest/openapi/RestOpenApiEndpoint.java  |  3 +--
 .../ROOT/pages/camel-4x-upgrade-guide-4_5.adoc       | 20 ++++----------------
 2 files changed, 5 insertions(+), 18 deletions(-)

diff --git a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
index 9a04ed39ef5..b121f6712d5 100644
--- a/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
+++ b/components/camel-rest-openapi/src/main/java/org/apache/camel/component/rest/openapi/RestOpenApiEndpoint.java
@@ -88,8 +88,7 @@ import static org.apache.camel.util.StringHelper.before;
 import static org.apache.camel.util.StringHelper.notEmpty;
 
 /**
- * Configure REST producers based on an OpenAPI specification document delegating to a component implementing the
- * RestProducerFactory interface.
+ * To call REST services using OpenAPI specification as contract.
  */
 @UriEndpoint(firstVersion = "3.1.0", scheme = "rest-openapi", title = "REST OpenApi",
              syntax = "rest-openapi:specificationUri#operationId", category = { Category.REST, Category.API },
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
index 1911e336948..908b9ed90c9 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_5.adoc
@@ -107,23 +107,11 @@ micrometer and metrics no longer include statistics for those Kamelet routes.
 The old behaviour can be enabled by setting `registerRoutesCreateByKamelet=true`
 on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] documentation.
 
-=== camel-kamelet
-
-Routes created by Kamelets are no longer registered as JMX MBeans to avoid cluttering up with unwanted MBeans, as a Kamelet
-is intended to act like a Camel component, despite its implementation is Camel routes. This means that the number of routes
-listed from JMX will no longer include Kamelet routes.
-
-The old behaviour can be enabled by setting `registerRoutesCreateByKamelet=true`
-on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] documentation.
+=== camel-openapi-java and camel-rest-openapi
 
-=== camel-micrometer and camel-metrics
-
-Due to Kamelets are changed to act more like a Camel component, and not expose internal details as JMX MBeans, then
-micrometer and metrics no longer include statistics for those Kamelet routes.
-
-The old behaviour can be enabled by setting `registerRoutesCreateByKamelet=true`
-on the `ManagementAgent` object. See more in the xref:jmx.adoc[JMX] documentation.
+Dropped support for the old Swagger 2.0 spec. Only OpenAPI v3 specs is supported now.
+Fixed maven dependencies to be JakartaEE compatible.
 
 === camel-platform-http-vertx
 
-Added a Cookie Handler allowing the addition, retrieval and expiry of Cookies.
\ No newline at end of file
+Added a Cookie Handler allowing the addition, retrieval and expiry of Cookies.


(camel) 06/06: CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)

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

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

commit f234dae17fa1c6090e13ffd898c8287bf149b57f
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Feb 29 10:36:15 2024 +0100

    CAMEL-20488: Drop support for old swagger v2 spec (openapi v2)
---
 .../src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
index ef2a47ccc37..441ab9bf063 100644
--- a/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
+++ b/components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiSupport.java
@@ -146,13 +146,11 @@ public class RestOpenApiSupport {
                         parseVariables(openapi.getServers().get(0).getUrl(),
                                 openapi.getServers().get(0)));
                 host = serverUrl.getHost();
-
             } catch (MalformedURLException e) {
-                LOG.info("error when parsing OpenApi 3.0 doc server url", e);
+                LOG.debug("Error when parsing OpenApi 3.0 doc server url. This exception is ignored.", e);
             }
         }
         return host;
-
     }
 
     public static String getBasePathFromOasDocument(final OpenAPI openapi) {