Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 756014e9c -> f54ac6b87


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/f54ac6b8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f54ac6b8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f54ac6b8

Branch: refs/heads/3.1.x-fixes
Commit: f54ac6b8747590a2ab37738d95d775b062ab9b35
Parents: 756014e
Author: Dennis Kieselhorst <[email protected]>
Authored: Wed Aug 16 22:29:21 2017 +0200
Committer: Sergey Beryozkin <[email protected]>
Committed: Wed Aug 23 11:28:17 2017 +0100

----------------------------------------------------------------------
 .../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/f54ac6b8/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 b929db5..81d2965 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;
@@ -48,4 +49,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/f54ac6b8/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 04fa15b..4e6ea32 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
@@ -8,7 +8,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:
@@ -19,7 +19,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:

Reply via email to