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

deki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b73084  [CXF-7634] changed Spring Boot sample to use OpenApiFeature
5b73084 is described below

commit 5b7308408d8b0127a5ee4deea7bd66b44217dd58
Author: Dennis Kieselhorst <d...@apache.org>
AuthorDate: Sun Mar 11 13:51:47 2018 +0100

    [CXF-7634] changed Spring Boot sample to use OpenApiFeature
---
 .../main/release/samples/jax_rs/spring_boot/README   |  6 +++---
 .../main/release/samples/jax_rs/spring_boot/pom.xml  |  2 +-
 .../sample/rs/service/SampleRestApplication.java     | 20 ++++++++++----------
 .../sample/rs/service/hello1/HelloServiceImpl1.java  |  3 +--
 .../sample/rs/service/hello2/HelloServiceImpl2.java  |  5 ++---
 5 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot/README 
b/distribution/src/main/release/samples/jax_rs/spring_boot/README
index 36c5ada..164955b 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot/README
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot/README
@@ -47,13 +47,13 @@ 
http://localhost:8080/services/helloservice/sayHello2/ApacheCxfUser
 will display "Hello2 ApacheCxfUser, Welcome to CXF RS Spring Boot World!!!"
 
 
-http://localhost:8080/services/helloservice/swagger.json will return a Swagger 
JSON
+http://localhost:8080/services/helloservice/openapi.json will return a Swagger 
JSON
 description of services.
 
-To view the Swagger document using Swagger-UI, use your Browser to 
+To view the OpenAPI document using Swagger-UI, use your browser to
 open the Swagger-UI page at
 
-  
http://localhost:8080/services/helloservice/api-docs?url=/services/helloservice/swagger.json
+  
http://localhost:8080/services/helloservice/api-docs?url=/services/helloservice/openapi.json
 
 or access it from the CXF Services page:
 
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot/pom.xml 
b/distribution/src/main/release/samples/jax_rs/spring_boot/pom.xml
index 0421668..4a8d527 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot/pom.xml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot/pom.xml
@@ -36,7 +36,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
-            <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
+            <artifactId>cxf-rt-rs-service-description-openapi-v3</artifactId>
             <version>${project.version}</version>
         </dependency>
         <dependency>
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
index 0c8e00f..97eac55 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/SampleRestApplication.java
@@ -23,7 +23,7 @@ import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.ext.logging.LoggingFeature;
 import org.apache.cxf.jaxrs.JAXRSServerFactoryBean;
-import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
+import org.apache.cxf.jaxrs.openapi.OpenApiFeature;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -47,19 +47,19 @@ public class SampleRestApplication {
         endpoint.setBus(bus);
         endpoint.setServiceBeans(Arrays.<Object>asList(new 
HelloServiceImpl1(), new HelloServiceImpl2()));
         endpoint.setAddress("/");
-        endpoint.setFeatures(Arrays.asList(createSwaggerFeature(), new 
LoggingFeature()));
+        endpoint.setFeatures(Arrays.asList(createOpenApiFeature(), new 
LoggingFeature()));
         return endpoint.create();
     }
 
-    public Swagger2Feature createSwaggerFeature() {
-        Swagger2Feature swagger2Feature = new Swagger2Feature();
-        swagger2Feature.setPrettyPrint(true);
-        swagger2Feature.setTitle("Spring Boot CXF REST Application");
-        swagger2Feature.setContact("The Apache CXF team");
-        swagger2Feature.setDescription("This sample project demonstrates how 
to use CXF JAX-RS services"
+    public OpenApiFeature createOpenApiFeature() {
+        OpenApiFeature openApiFeature = new OpenApiFeature();
+        openApiFeature.setPrettyPrint(true);
+        openApiFeature.setTitle("Spring Boot CXF REST Application");
+        openApiFeature.setContactName("The Apache CXF team");
+        openApiFeature.setDescription("This sample project demonstrates how to 
use CXF JAX-RS services"
                 + " with Spring Boot. This demo has two JAX-RS class resources 
being"
                 + " deployed in a single JAX-RS endpoint.");
-        swagger2Feature.setVersion("1.0.0");
-        return swagger2Feature;
+        openApiFeature.setVersion("1.0.0");
+        return openApiFeature;
     }
 }
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
index 481a787..06a5dd9 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello1/HelloServiceImpl1.java
@@ -17,10 +17,9 @@
  * under the License.
  */
 package sample.rs.service.hello1;
-import io.swagger.annotations.Api;
+
 import sample.rs.service.HelloService;
 
-@Api("/sayHello")
 public class HelloServiceImpl1 implements HelloService {
 
     public String sayHello(String a) {
diff --git 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
index ee44929..91edae0 100644
--- 
a/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
+++ 
b/distribution/src/main/release/samples/jax_rs/spring_boot/src/main/java/sample/rs/service/hello2/HelloServiceImpl2.java
@@ -17,12 +17,11 @@
  * under the License.
  */
 package sample.rs.service.hello2;
-import javax.ws.rs.Path;
 
-import io.swagger.annotations.Api;
+import javax.ws.rs.Path;
 import sample.rs.service.HelloService;
+
 @Path("/sayHello2")
-@Api("/sayHello2")
 public class HelloServiceImpl2 implements HelloService {
 
     public String sayHello(String a) {

-- 
To stop receiving notification emails like this one, please contact
d...@apache.org.

Reply via email to