You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by de...@apache.org on 2018/04/08 19:00:02 UTC
[cxf] branch master updated: [CXF-7694] added missing
OpenApiCustomizer to fix sample
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 a94e978 [CXF-7694] added missing OpenApiCustomizer to fix sample
a94e978 is described below
commit a94e978c53a9b0708f06d15e7f69ccd8ffc2d395
Author: Dennis Kieselhorst <de...@apache.org>
AuthorDate: Tue Apr 3 21:55:04 2018 +0200
[CXF-7694] added missing OpenApiCustomizer to fix sample
---
.../src/main/java/sample/rs/service/SampleRestApplication.java | 4 ++++
1 file changed, 4 insertions(+)
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 97eac55..55132f9 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,6 +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.openapi.OpenApiCustomizer;
import org.apache.cxf.jaxrs.openapi.OpenApiFeature;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
@@ -54,6 +55,9 @@ public class SampleRestApplication {
public OpenApiFeature createOpenApiFeature() {
OpenApiFeature openApiFeature = new OpenApiFeature();
openApiFeature.setPrettyPrint(true);
+ OpenApiCustomizer customizer = new OpenApiCustomizer();
+ customizer.setDynamicBasePath(true);
+ openApiFeature.setCustomizer(customizer);
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"
--
To stop receiving notification emails like this one, please contact
deki@apache.org.