Move to 4.0.0-SNAPSHOT
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
diff --git a/pom.xml b/pom.xml
index ffa526f..7361008 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,6 @@
<module>rabbitmq</module>
<module>reactive-streams</module>
<module>resilience4j</module>
- <module>rest-swagger-simple</module>
<module>rest-openapi</module>
<module>rest-openapi-simple</module>
<module>rest-openapi-springdoc</module>
diff --git a/rest-swagger-simple/README.adoc b/rest-swagger-simple/README.adoc
deleted file mode 100644
index 606a519..0000000
--- a/rest-swagger-simple/README.adoc
+++ /dev/null
@@ -1,41 +0,0 @@
-== Camel Rest Swagger example
-
-This example shows how to call a REST service defined using Swagger
-specification with the help of Camel Rest Swagger component.
-
-The example is a standalone Spring Boot application that acts as a REST
-client, you can run simply by issuing:
-
-....
-$ mvn spring-boot:run
-....
-
-Or by packaging it and running it using `+java+` CLI:
-
-....
-$ mvn package
-$ java -jar target/camel-example-spring-boot-rest-swagger-simple-*.jar
-....
-
-The example by default uses the PetStore demo hosted on swagger.io and
-invokes the `+getInventory+` operation. You can make it call any API
-that you have Swagger specification for and any operation with simple
-arguments, for instance this retrieves a pet from the PetStore demo with
-ID `+14+`:
-
-....
-$ java -jar target/camel-example-spring-boot-rest-swagger-simple-*.jar \
- --swagger=https://petstore.swagger.io/v2/swagger.json \
- --operation=getPetById \
- --petId=14
-....
-
-=== Help and contributions
-
-If you hit any problem using Camel or have some feedback, then please
-https://camel.apache.org/community/support/[let us know].
-
-We also love contributors, so
-https://camel.apache.org/community/contributing/[get involved] :-)
-
-The Camel riders!
diff --git a/rest-swagger-simple/pom.xml b/rest-swagger-simple/pom.xml
deleted file mode 100644
index 09f37f0..0000000
--- a/rest-swagger-simple/pom.xml
+++ /dev/null
@@ -1,103 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.camel.springboot.example</groupId>
- <artifactId>examples</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>camel-example-spring-boot-rest-swagger-simple</artifactId>
- <name>Camel SB Examples :: Rest :: Swagger Simple</name>
- <description>This example shows how to call a Rest service defined using Swagger specification</description>
-
- <properties>
- <category>Rest</category>
- <title>REST Swagger</title>
-
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <!-- Spring Boot BOM -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-dependencies</artifactId>
- <version>${spring-boot-version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- <!-- Camel BOM -->
- <dependency>
- <groupId>org.apache.camel.springboot</groupId>
- <artifactId>camel-spring-boot-bom</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <dependency>
- <groupId>org.apache.camel.springboot</groupId>
- <artifactId>camel-http-starter</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.camel.springboot</groupId>
- <artifactId>camel-rest-swagger-starter</artifactId>
- <version>${project.version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>${maven-resources-plugin-version}</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>${spring-boot-version}</version>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-</project>
diff --git a/rest-swagger-simple/src/main/java/org/apache/camel/example/RestSwaggerApplication.java b/rest-swagger-simple/src/main/java/org/apache/camel/example/RestSwaggerApplication.java
deleted file mode 100644
index 72f43d6..0000000
--- a/rest-swagger-simple/src/main/java/org/apache/camel/example/RestSwaggerApplication.java
+++ /dev/null
@@ -1,68 +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.example;
-
-import java.util.Map;
-import java.util.function.Predicate;
-import java.util.stream.Collectors;
-
-import org.apache.camel.ProducerTemplate;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.ApplicationArguments;
-import org.springframework.boot.ApplicationRunner;
-import org.springframework.boot.SpringApplication;
-import org.springframework.boot.autoconfigure.SpringBootApplication;
-import org.springframework.context.ApplicationContext;
-
-import static java.util.function.Function.identity;
-
-@SpringBootApplication
-public class RestSwaggerApplication implements ApplicationRunner {
-
- @Autowired
- ApplicationContext context;
-
- @Value("${operation:getInventory}")
- String operation;
-
- @Value("${swagger:http://petstore.swagger.io/v2/swagger.json}")
- String specificationUri;
-
- @Autowired
- ProducerTemplate template;
-
- @Override
- public void run(final ApplicationArguments args) throws Exception {
- final Predicate<String> operations = "operation"::equals;
-
- final Map<String, Object> headers = args.getOptionNames().stream().filter(operations.negate())
- .collect(Collectors.toMap(identity(), arg -> args.getOptionValues(arg).get(0)));
-
- final String body = template.requestBodyAndHeaders("rest-swagger:" + specificationUri + "#" + operation, null,
- headers, String.class);
-
- System.out.println(body);
-
- SpringApplication.exit(context, () -> 0);
- }
-
- public static void main(final String[] args) {
- SpringApplication.run(RestSwaggerApplication.class, args);
- }
-
-}