[cxf] branch 3.3.x-fixes updated (0a84acd -> 2dd0450)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[cxf] branch 3.3.x-fixes updated (0a84acd -> 2dd0450)

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

reta pushed a change to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git.


    from 0a84acd  Recording .gitmergeinfo Changes
     new ba48963  CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9
     new 2dd0450  CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/resources/OSGI-INF/blueprint/context.xml  |  1 +
 .../src/main/resources/context.xml                 |  2 ++
 .../karaf/features/src/main/resources/features.xml |  6 ++++--
 parent/pom.xml                                     |  5 +++--
 .../apache/cxf/jaxrs/openapi/OpenApiFeature.java   | 22 ++++++++++++++++++++++
 5 files changed, 32 insertions(+), 4 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[cxf] 01/02: CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9

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

reta pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit ba4896378eeb0c01152ea09ae0bdd3e123207736
Author: reta <[hidden email]>
AuthorDate: Sat Sep 7 11:29:45 2019 -0400

    CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9
   
    (cherry picked from commit 24f6584cf3d24d6e60d6931fad4d561f92a96e46)
---
 .../src/main/resources/OSGI-INF/blueprint/context.xml               | 1 +
 osgi/karaf/features/src/main/resources/features.xml                 | 6 ++++--
 parent/pom.xml                                                      | 5 +++--
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_osgi/src/main/resources/OSGI-INF/blueprint/context.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
index f5e7b3d..8790a4a 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
@@ -39,6 +39,7 @@
 
     <!-- CXF OpenApiFeature -->  
     <bean id="openApiFeature" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature">
+        <property name="scan" value="false" />
     </bean>
 
     <cxf:bus>
diff --git a/osgi/karaf/features/src/main/resources/features.xml b/osgi/karaf/features/src/main/resources/features.xml
index 593df85..88fee35 100644
--- a/osgi/karaf/features/src/main/resources/features.xml
+++ b/osgi/karaf/features/src/main/resources/features.xml
@@ -317,11 +317,12 @@
         <bundle start-level="40">mvn:org.apache.cxf/cxf-rt-rs-service-description-common-openapi/${project.version}</bundle>
         <bundle start-level="35">mvn:org.apache.cxf/cxf-rt-rs-service-description-swagger-ui/${project.version}</bundle>
         <bundle start-level="40">mvn:org.apache.cxf/cxf-rt-rs-service-description-swagger/${project.version}</bundle>
+        <bundle start-level="35" dependency="true">mvn:com.fasterxml.jackson.datatype/jackson-datatype-jsr310/${cxf.jackson.version}</bundle>
         <bundle start-level="10" dependency="true">mvn:javax.validation/validation-api/${cxf.validation.api.version}</bundle>
         <bundle start-level="35" dependency="true">mvn:org.apache.commons/commons-lang3/${cxf.commons-lang3.version}</bundle>
         <bundle start-level="30" dependency="true">mvn:org.javassist/javassist/${cxf.javassist.version}</bundle>
         <bundle start-level="30" dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections/${cxf.reflections.bundle.version}</bundle>
-        <bundle start-level="25" dependency="true">mvn:com.google.guava/guava/${cxf.guava.version}</bundle>
+        <bundle start-level="25" dependency="true">mvn:com.google.guava/guava/${cxf.swagger2.guava.version}</bundle>
         <bundle start-level="35" dependency="true">mvn:io.swagger/swagger-annotations/${cxf.swagger2.version}</bundle>
         <bundle start-level="35" dependency="true">mvn:io.swagger/swagger-models/${cxf.swagger2.version}</bundle>
         <bundle start-level="35" dependency="true">mvn:io.swagger/swagger-core/${cxf.swagger2.version}</bundle>
@@ -333,7 +334,8 @@
         <bundle start-level="40">mvn:org.apache.cxf/cxf-rt-rs-service-description-common-openapi/${project.version}</bundle>
         <bundle start-level="35">mvn:org.apache.cxf/cxf-rt-rs-service-description-swagger-ui/${project.version}</bundle>
         <bundle start-level="40">mvn:org.apache.cxf/cxf-rt-rs-service-description-openapi-v3/${project.version}</bundle>
-        <bundle dependency="true" start-level="35">mvn:${cxf.servlet-api.group}/${cxf.servlet-api.artifact}/${cxf.servlet-api.version}</bundle>
+        <bundle start-level="35" dependency="true">mvn:com.fasterxml.jackson.datatype/jackson-datatype-jsr310/${cxf.jackson.version}</bundle>
+        <bundle start-level="35" dependency="true">mvn:${cxf.servlet-api.group}/${cxf.servlet-api.artifact}/${cxf.servlet-api.version}</bundle>
         <bundle start-level="10" dependency="true">mvn:javax.validation/validation-api/${cxf.validation.api.version}</bundle>
         <bundle start-level="35" dependency="true">mvn:org.apache.commons/commons-lang3/${cxf.commons-lang3.version}</bundle>
         <bundle start-level="30" dependency="true">mvn:io.github.classgraph/classgraph/${cxf.classgraph.version}</bundle>
diff --git a/parent/pom.xml b/parent/pom.xml
index 7bcc4e8..35a27a9 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -197,8 +197,9 @@
         <cxf.spring.version>5.1.9.RELEASE</cxf.spring.version>
         <cxf.stax-ex.version>1.7.6</cxf.stax-ex.version>
         <cxf.swagger.ui.version>3.23.0</cxf.swagger.ui.version>
-        <cxf.swagger.v3.version>2.0.8</cxf.swagger.v3.version>
-        <cxf.swagger2.version>1.5.21</cxf.swagger2.version>
+        <cxf.swagger.v3.version>2.0.9</cxf.swagger.v3.version>
+        <cxf.swagger2.version>1.5.23</cxf.swagger2.version>
+        <cxf.swagger2.guava.version>27.0-jre</cxf.swagger2.guava.version>
         <cxf.tika.version>1.22</cxf.tika.version>
         <cxf.tomcat.version>8.5.45</cxf.tomcat.version>
         <cxf.tomitribe.http.signature.version>1.3</cxf.tomitribe.http.signature.version>

Reply | Threaded
Open this post in threaded view
|

[cxf] 02/02: CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9

reta
In reply to this post by reta
This is an automated email from the ASF dual-hosted git repository.

reta pushed a commit to branch 3.3.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit 2dd0450422b5952b15ddab15b7f40dee499bc1a5
Author: reta <[hidden email]>
AuthorDate: Sat Sep 7 15:51:42 2019 -0400

    CXF-8106: Update to Swagger Core 1.5.23 and 2.0.9
   
    (cherry picked from commit 5a4abaa246dae133ff6fe2373e52b1bb6a72a218)
---
 .../src/main/resources/context.xml                 |  2 ++
 .../apache/cxf/jaxrs/openapi/OpenApiFeature.java   | 22 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_spring/src/main/resources/context.xml b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_spring/src/main/resources/context.xml
index 73aeb15..f7ae78d 100644
--- a/distribution/src/main/release/samples/jax_rs/description_openapi_v3_spring/src/main/resources/context.xml
+++ b/distribution/src/main/release/samples/jax_rs/description_openapi_v3_spring/src/main/resources/context.xml
@@ -41,12 +41,14 @@
         <property name="title" value="Sample REST Application" />
         <property name="useContextBasedConfig" value="true" />
         <property name="scan" value="false" />
+        <property name="scannerClass" value="io.swagger.v3.jaxrs2.integration.JaxrsApplicationScanner"/>
     </bean>
     
     <bean id="openApiFeature2" class="org.apache.cxf.jaxrs.openapi.OpenApiFeature">
         <property name="title" value="Sample2 REST Application" />
         <property name="useContextBasedConfig" value="true" />
         <property name="scan" value="false" />
+        <property name="scannerClass" value="io.swagger.v3.jaxrs2.integration.JaxrsApplicationScanner"/>
     </bean>
 
     <cxf:bus>
diff --git a/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java b/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
index e7900e2..c35fffa 100644
--- a/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
+++ b/rt/rs/description-openapi-v3/src/main/java/org/apache/cxf/jaxrs/openapi/OpenApiFeature.java
@@ -304,6 +304,14 @@ public class OpenApiFeature extends DelegatingFeature<OpenApiFeature.Portable>
     public boolean isUseContextBasedConfig() {
         return delegate.isUseContextBasedConfig();
     }
+    
+    public String getScannerClass() {
+        return delegate.getScannerClass();
+    }
+
+    public void setScannerClass(String scannerClass) {
+        delegate.setScannerClass(scannerClass);
+    }
 
     @Override
     public SwaggerUiConfig getSwaggerUiConfig() {
@@ -414,6 +422,8 @@ public class OpenApiFeature extends DelegatingFeature<OpenApiFeature.Portable>
         // are co-located in the same application.
         private boolean useContextBasedConfig;
         private String ctxId;
+        // The API Scanner class to use
+        private String scannerClass;
 
         @Override
         public void initialize(Server server, Bus bus) {
@@ -463,6 +473,10 @@ public class OpenApiFeature extends DelegatingFeature<OpenApiFeature.Portable>
                         .filterClass(getOrFallback(getFilterClass(), swaggerProps, FILTER_CLASS_PROPERTY))
                         .resourceClasses(getResourceClasses())
                         .resourcePackages(getOrFallback(packages, swaggerProps, RESOURCE_PACKAGE_PROPERTY));
+                
+                if (!StringUtils.isEmpty(getScannerClass())) {
+                    config.setScannerClass(getScannerClass());
+                }
 
                 openApiConfiguration = new JaxrsOpenApiContextBuilder<>()
                         .application(application)
@@ -732,6 +746,14 @@ public class OpenApiFeature extends DelegatingFeature<OpenApiFeature.Portable>
             return useContextBasedConfig;
         }
 
+        public String getScannerClass() {
+            return scannerClass;
+        }
+
+        public void setScannerClass(String scannerClass) {
+            this.scannerClass = scannerClass;
+        }
+
         @Override
         public SwaggerUiConfig getSwaggerUiConfig() {
             return swaggerUiConfig;