cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating WADLGenerator to optionally avoid converting relative links to absolute ones in the external documents
Date Tue, 03 Feb 2015 12:39:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 91b35bce7 -> 78650303e


Updating WADLGenerator to optionally avoid converting relative links to absolute ones in the
external documents


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

Branch: refs/heads/3.0.x-fixes
Commit: 78650303ecca224b141a7d557573cb7b507d4489
Parents: 91b35bc
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Feb 3 12:35:17 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Feb 3 12:39:32 2015 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java  | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/78650303/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
index 6e2cab2..491c0c5 100644
--- a/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
+++ b/rt/rs/description/src/main/java/org/apache/cxf/jaxrs/model/wadl/WadlGenerator.java
@@ -156,6 +156,7 @@ public class WadlGenerator implements ContainerRequestFilter {
     private boolean supportJaxbSubstitutions = true;
     private boolean ignoreOverloadedMethods;
     private boolean checkAbsolutePathSlash;
+    private boolean keepRelativeDocLinks;
     
     private List<String> externalSchemasCache;
     private List<URI> externalSchemaLinks;
@@ -1169,6 +1170,9 @@ public class WadlGenerator implements ContainerRequestFilter {
 
     private void handleExistingDocRefs(List<Element> elements, String attrName, String
parentDocLoc,
                                        String parentRef, Message m, UriInfo ui) {
+        if (keepRelativeDocLinks) {
+            return;
+        }
         int index = parentDocLoc.lastIndexOf('/');
         parentDocLoc = index == -1 ? parentDocLoc : parentDocLoc.substring(0, index + 1);
 
@@ -2041,6 +2045,10 @@ public class WadlGenerator implements ContainerRequestFilter {
         this.ignoreOverloadedMethods = ignore;
     }
 
+    public void setKeepRelativeDocLinks(boolean keepRelativeDocLinks) {
+        this.keepRelativeDocLinks = keepRelativeDocLinks;
+    }
+
     private static class SchemaConverter extends DelegatingXMLStreamWriter {
         private static final String SCHEMA_LOCATION = "schemaLocation";
         private Map<String, String> locsMap;


Mime
View raw message