cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cxf git commit: improved Swagger description
Date Wed, 16 Aug 2017 20:29:33 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2fbd4e82b -> 1dc79d9d5


improved Swagger description


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/1dc79d9d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/1dc79d9d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/1dc79d9d

Branch: refs/heads/master
Commit: 1dc79d9d5a04462dea347a6b0a583458c2c28c47
Parents: 2fbd4e8
Author: Dennis Kieselhorst <deki@apache.org>
Authored: Wed Aug 16 22:29:21 2017 +0200
Committer: Dennis Kieselhorst <deki@apache.org>
Committed: Wed Aug 16 22:29:21 2017 +0200

----------------------------------------------------------------------
 .../java/sample/rs/service/SampleRestApplication.java | 14 ++++++++++++++
 .../application/src/main/resources/application.yml    |  4 ++--
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/1dc79d9d/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
index 1f3ff56..1413b5a 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/java/sample/rs/service/SampleRestApplication.java
@@ -21,6 +21,7 @@ import java.util.Collections;
 
 import com.codahale.metrics.MetricRegistry;
 
+import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
 import org.springframework.boot.actuate.endpoint.MetricsEndpoint;
@@ -47,4 +48,17 @@ public class SampleRestApplication {
     public static void main(String[] args) {
         SpringApplication.run(SampleRestApplication.class, args);
     }
+
+    @Bean
+    public Swagger2Feature enhancedSwaggerDescription() {
+        Swagger2Feature swagger2Feature = new Swagger2Feature();
+        swagger2Feature.setPrettyPrint(true);
+        swagger2Feature.setTitle("Spring Boot CXF REST Scan Application");
+        swagger2Feature.setContact("The Apache CXF team");
+        swagger2Feature.setDescription("This sample project demonstrates how to use CXF JAX-RS
services"
+                + " with Spring Boot. This demo has two JAX-RS class resources being auto-discovered"
+                + " and deployed in a single JAX-RS endpoint.");
+        swagger2Feature.setVersion("1.0.0");
+        return swagger2Feature;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/1dc79d9d/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
index 6ca143d..41e2dd9 100644
--- a/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
+++ b/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml
@@ -10,7 +10,7 @@ cxf:
     service-list-path: /info
   jaxrs:
     component-scan: true
-    classes-scan-packages: org.apache.cxf.jaxrs.swagger,org.apache.cxf.metrics
+    classes-scan-packages: org.apache.cxf.metrics
 
 eureka:
   client:
@@ -21,7 +21,7 @@ eureka:
     statusPageUrlPath: /services/helloservice/info
     healthCheckUrlPath: /system/health
     metadataMap:
-      instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}

+      instanceId: ${spring.application.name}:${spring.application.instance_id:${random.value}}
       servletPath: ${cxf.path}
 
 endpoints:


Mime
View raw message