cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r976159 - in /websites/production/cxf/content: cache/docs.pageCache docs/swaggerfeature-swagger2feature.html
Date Tue, 22 Dec 2015 14:47:44 GMT
Author: buildbot
Date: Tue Dec 22 14:47:44 2015
New Revision: 976159

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html
==============================================================================
--- websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html (original)
+++ websites/production/cxf/content/docs/swaggerfeature-swagger2feature.html Tue Dec 22 14:47:44
2015
@@ -118,12 +118,12 @@ Apache CXF -- SwaggerFeature / Swagger2F
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><h1 id="SwaggerFeature/Swagger2Feature-SwaggerFeature/Swagger2Feature">SwaggerFeature
/ Swagger2Feature</h1><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1442832427934 {padding: 0px;}
-div.rbtoc1442832427934 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1442832427934 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1450795621127 {padding: 0px;}
+div.rbtoc1450795621127 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1450795621127 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1442832427934">
-<ul class="toc-indentation"><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-SwaggerFeature/Swagger2Feature">SwaggerFeature
/ Swagger2Feature</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Properties">Properties</a></li><li><a
shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringProgramatically">Configuring
Programatically</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringinSpring">Configuring
in Spring</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringinBlueprint">Configuring
in Blueprint</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Samples">Samples</a></li></ul>
+/*]]>*/</style></p><div class="toc-macro rbtoc1450795621127">
+<ul class="toc-indentation"><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-SwaggerFeature/Swagger2Feature">SwaggerFeature
/ Swagger2Feature</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Properties">Properties</a></li><li><a
shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringProgramatically">Configuring
Programatically</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringinSpring">Configuring
in Spring</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringinBlueprint">Configuring
in Blueprint</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-ConfiguringinCXFNonSpringJaxrsServlet">Configuring
in CXFNonSpringJaxrsServlet</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Samples">Samples</a></li></ul>
 </div><p>&#160;</p><p>The CXF Swagger2Feature allows you to generate&#160;<a
shape="rect" class="external-link" href="http://swagger.io/specification/" rel="nofollow">Swagger
2.0</a>&#160;documents from JAX-RS service endpoints with a simple configuration.</p><p>For
generating <a shape="rect" class="external-link" href="https://github.com/swagger-api/swagger-spec/blob/master/versions/1.2.md"
rel="nofollow">Swagger 1.2</a> documents, you can use SwaggerFeature instead of Swagger2Feature.</p><p>These
features can be configured programatically in Java or using Spring or Blueprint beans.</p><h1
id="SwaggerFeature/Swagger2Feature-Properties">Properties</h1><p><span style="line-height:
1.4285715;">The following optional parameters can be configured in Swagger2Feature</span></p><p><span
style="line-height: 1.4285715;">Note some properties listed below are not available or
used differently in SwaggerFeature, as the corresponding properties are used differently in
Swagger 2.0 and Swagger 1.2
 . Please refer to the corresponding Swagger documentation for more information.)</span></p><div
class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1"
rowspan="1" class="confluenceTh">Name</th><th colspan="1" rowspan="1" class="confluenceTh">Description</th><th
colspan="1" rowspan="1" class="confluenceTh">Default</th></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">basePath</td><td colspan="1" rowspan="1"
class="confluenceTd">the context root path<sup>+</sup></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">contact</td><td colspan="1" rowspan="1" class="confluenceTd">the
contact information<span>+</span></td><td colspan="1" rowspan="1" class="confluenceTd">"users@cxf.apache.org"</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">description</td><td colspan="1" rowspan="1"
class="confluenceTd">the description<span>+</span></td><td colspan="1"
rowspan="1" class="confluenceT
 d">"The Application"</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">filterClass</td><td
colspan="1" rowspan="1" class="confluenceTd">a security filter<span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">host</td><td colspan="1" rowspan="1"
class="confluenceTd">the host and port<span>+</span></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">ignoreRoutes</td><td colspan="1" rowspan="1"
class="confluenceTd">excludes specific paths when scanning all resources (see scanAllResources)<span>+</span><span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">license</td><td colspan="1" rowspan="1"
class="confluenceTd">the license<span>+</span></td><td colspan="1"
rowspan="1" class="confluenceTd">"Apache 2.0 License"</td></tr><tr><td
colspan="1" rowspan=
 "1" class="confluenceTd">licenceUrl</td><td colspan="1" rowspan="1" class="confluenceTd">the
license URL<span>+</span></td><td colspan="1" rowspan="1" class="confluenceTd">"<span
class="nolink">http://www.apache.org/licenses/LICENSE-2.0.html</span>"</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">prettyPrint</td><td colspan="1" rowspan="1"
class="confluenceTd">when generating swagger.json, pretty-print the json document<span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">false</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">resourcePackage</td><td colspan="1"
rowspan="1" class="confluenceTd">a list of comma separated package names where resources
must be scanned<span>+</span></td><td colspan="1" rowspan="1" class="confluenceTd">a
list of service classes configured at the endpoint</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">runAsFilter</td><td colspan="1" rowspan="1" class="confluenceTd">runs
the feature as a filter</td><td
  colspan="1" rowspan="1" class="confluenceTd">false</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">scan</td><td colspan="1" rowspan="1"
class="confluenceTd">generates the swagger documentation<span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">scanAllResources</td><td colspan="1"
rowspan="1" class="confluenceTd">scans all resources including non-annotated JAX-RS resources<span>+</span><span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">false</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">schemes</td><td colspan="1" rowspan="1"
class="confluenceTd">the protocol schemes<span>+</span></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">termsOfServiceUrl</td><td colspan="1" rowspan="1"
class="confluenceTd">the terms of service URL<span>+</span></td><td
colspan="1" rowspan="1" class="confluence
 Td">null</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">title</td><td
colspan="1" rowspan="1" class="confluenceTd">the title<span>+</span></td><td
colspan="1" rowspan="1" class="confluenceTd">"Sample REST Application"</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">version</td><td colspan="1" rowspan="1"
class="confluenceTd">the version<span>+</span></td><td colspan="1"
rowspan="1" class="confluenceTd">"1.0.0"</td></tr></tbody></table></div><p>Note:
those descriptions marked with&#160;<span>+ correspond to the properties defined
in Swagger's BeanConfig, and those marked with&#160;<span>+</span><span>+
correspond to&#160;the properties defined in Swagger's ReaderConfig.</span></span></p><h1
id="SwaggerFeature/Swagger2Feature-ConfiguringProgramatically">Configuring Programatically</h1><p>&#160;</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
 <pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">import
org.apache.cxf.frontend.ServerFactoryBean;
 import org.apache.cxf.jaxrs.swagger.Swagger2Feature;
@@ -208,6 +208,40 @@ import org.apache.cxf.jaxrs.swagger.Swag
     &lt;/jaxrs:server&gt;
 &lt;/blueprint&gt;
 &#160;</pre>
+</div></div><h1 id="SwaggerFeature/Swagger2Feature-ConfiguringinCXFNonSpringJaxrsServlet">Configuring
in CXFNonSpringJaxrsServlet</h1><p>&#160;</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: xml; gutter: false; theme: Default" style="font-size:12px;">&lt;web-app&gt;
+    &lt;context-param&gt;
+        &lt;param-name&gt;contextParam&lt;/param-name&gt;
+        &lt;param-value&gt;contextParamValue&lt;/param-value&gt;
+    &lt;/context-param&gt;
+    &lt;servlet&gt;
+        &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
+        &lt;display-name&gt;CXF Servlet&lt;/display-name&gt;
+        &lt;servlet-class&gt;
+              org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet
+        &lt;/servlet-class&gt;
+        &lt;init-param&gt;
+            &lt;param-name&gt;jaxrs.serviceClasses&lt;/param-name&gt;
+            &lt;param-value&gt;
+                           org.apache.cxf.systest.jaxrs.BookStore
+                      &lt;/param-value&gt;
+        &lt;/init-param&gt;
+        &lt;init-param&gt;
+            &lt;param-name&gt;jaxrs.features&lt;/param-name&gt;
+            &lt;param-value&gt;
+                        org.apache.cxf.jaxrs.swagger.Swagger2Feature
+                        (basePath=/somepath)
+            &lt;/param-value&gt;
+        &lt;/init-param&gt;
+        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
+    &lt;/servlet&gt;
+    
+    &lt;servlet-mapping&gt;
+        &lt;servlet-name&gt;CXFServlet&lt;/servlet-name&gt;
+        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
+    &lt;/servlet-mapping&gt;
+    
+&lt;/web-app&gt;</pre>
 </div></div><h1 id="SwaggerFeature/Swagger2Feature-Samples">Samples</h1><p><span>CXF's
distribution contains the following samples.</span></p><ul><li><a
shape="rect" class="external-link" href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger"
rel="nofollow">samples/jax_rs/description_swagger</a>: Swagger 1.2 sample using SwaggerFeature
programatically</li><li><a shape="rect" class="external-link" href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2"
rel="nofollow">samples/jax_rs/description_swagger2</a>:&#160;Swagger 2.0 sample
using Swagger2Feature programatically</li><li><a shape="rect" class="external-link"
href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2_web"
rel="nofollow">samples/jax_rs/description_swagger2_web</a>:&#160;Swagger 2.0
web application sample using Swagger2Feature using Spring</li><
 li><a shape="rect" class="external-link" href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2_osgi"
rel="nofollow">samples/jax_rs/description_swagger2_osgi</a>:&#160;Swagger 2.0
OSGi application sample using Swagger2Feature using Blueprint<br clear="none"><br
clear="none"></li></ul><p>&#160;</p></div>
            </div>
            <!-- Content -->



Mime
View raw message