From 795b8456c3a223a2437ef1e29b6f4eef816e73e5 Mon Sep 17 00:00:00 2001 From: James Netherton Date: Thu, 4 Jul 2024 07:14:03 +0100 Subject: [PATCH] Remove OpenAPI V2 integration test from camel-k-maven-plugin --- .../generate-rest-dsl-from-v2/document.json | 46 -------- .../src/it/generate-rest-dsl-from-v2/pom.xml | 102 ------------------ .../generate-rest-dsl-from-v2/verify.groovy | 27 ----- 3 files changed, 175 deletions(-) delete mode 100644 tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/document.json delete mode 100644 tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/pom.xml delete mode 100644 tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/verify.groovy diff --git a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/document.json b/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/document.json deleted file mode 100644 index 48e8f9e7fd55..000000000000 --- a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/document.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "swagger" : "2.0", - "info" : { - "version" : "1.0", - "title" : "Greeting REST API" - }, - "host" : "", - "basePath" : "/camel/", - "tags" : [ { - "name" : "greetings", - "description" : "Greeting to {name}" - } ], - "schemes" : [ "http" ], - "paths" : { - "/greetings/{name}" : { - "get" : { - "tags" : [ "greetings" ], - "operationId" : "greeting-api", - "parameters" : [ { - "name" : "name", - "in" : "path", - "required" : true, - "type" : "string" - } ], - "responses" : { - "200" : { - "description" : "Output type", - "schema" : { - "$ref" : "#/definitions/Greetings" - } - } - } - } - } - }, - "definitions" : { - "Greetings" : { - "type" : "object", - "properties" : { - "greetings" : { - "type" : "string" - } - } - } - } -} \ No newline at end of file diff --git a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/pom.xml b/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/pom.xml deleted file mode 100644 index 2d1e7cd0074f..000000000000 --- a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/pom.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - 4.0.0 - org.apache.camel.k - camel-k-catalog-generator - 1.0.0 - - - UTF-8 - ${project.basedir}/document.json - ${project.basedir}/document.xml - - - - - - org.apache.camel.quarkus - camel-quarkus-camel-k-maven-plugin - @project.version@ - - - generate-rest-xml - - generate-rest-xml - - - - - - - - - - apache.snapshots - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - oss.snapshots - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - - - - apache.snapshots - Apache Development Snapshot Repository - https://repository.apache.org/content/repositories/snapshots/ - - false - - - true - - - - oss.snapshots - https://oss.sonatype.org/content/repositories/snapshots - - false - - - true - - - - - diff --git a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/verify.groovy b/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/verify.groovy deleted file mode 100644 index 38cc8515ab4f..000000000000 --- a/tooling/camel-k-maven-plugin/src/it/generate-rest-dsl-from-v2/verify.groovy +++ /dev/null @@ -1,27 +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. - */ - - -new File(basedir, "document.xml").withReader { - def document = new groovy.xml.XmlSlurper().parse(it) - - assert document.rest.@path == '/camel/' - assert document.rest.get.size() == 1 - assert document.rest.get[0].@id == 'greeting-api' - assert document.rest.get[0].@path == '/greetings/{name}' - assert document.rest.get[0].to.@uri == 'direct:greeting-api' -}