You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2019/01/31 02:25:20 UTC

[cxf] branch 3.2.x-fixes updated: Followup on CXF-7957, fixing the merge (few statements lost)

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

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


The following commit(s) were added to refs/heads/3.2.x-fixes by this push:
     new 32f00d7  Followup on CXF-7957, fixing the merge (few statements lost)
32f00d7 is described below

commit 32f00d7c799549b57f2bbd8398908fb6d3cc9027
Author: reta <dr...@gmail.com>
AuthorDate: Wed Jan 30 21:25:06 2019 -0500

    Followup on CXF-7957, fixing the merge (few statements lost)
---
 .../apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java    | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
index b5e74e8..0acb427 100644
--- a/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
+++ b/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/parse/SwaggerParseUtils.java
@@ -20,6 +20,7 @@ package org.apache.cxf.jaxrs.swagger.parse;
 
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
@@ -156,6 +157,17 @@ public final class SwaggerParseUtils {
                         setJavaType(userParam, (String)param.get("type"));
                         userOpParams.add(userParam);
                     }
+                    if (!userOpParams.isEmpty()) {
+                        userOp.setParameters(userOpParams);
+                    }
+                    List<String> opTags = CastUtils.cast((List<?>)oper.get("tags"));
+                    if (opTags == null) {
+                        opTags = Collections.singletonList("");
+                    }
+                    for (String opTag : opTags) {
+                        userOpsMap.get(opTag).add(userOp);
+                    }
+
                 }
             }
         }