cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r994066 - in /websites/production/cxf/content: cache/docs.pageCache docs/swaggerfeature-swagger2feature.html
Date Fri, 29 Jul 2016 19:47:30 GMT
Author: buildbot
Date: Fri Jul 29 19:47:30 2016
New Revision: 994066

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 Fri Jul 29 19:47:30
2016
@@ -118,13 +118,23 @@ 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.rbtoc1465307218850 {padding: 0px;}
-div.rbtoc1465307218850 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1465307218850 li {margin-left: 0px;padding-left: 0px;}
-
-/*]]>*/</style></p><div class="toc-macro rbtoc1465307218850">
-<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-AccessingSwaggerdocuments">Accessing
Swagger documents</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">
+div.rbtoc1469821617901 {padding: 0px;}
+div.rbtoc1469821617901 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1469821617901 li {margin-left: 0px;padding-left: 0px;}
+
+/*]]>*/</style></p><div class="toc-macro rbtoc1469821617901">
+<ul class="toc-indentation"><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-SwaggerFeature/Swagger2Feature">SwaggerFeature
/ Swagger2Feature</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Setup">Setup</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-EnablinginSpringBoot">Enabling
in Spring Boot</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-Accessing
 SwaggerDocuments">Accessing Swagger Documents</a></li><li><a shape="rect"
href="#SwaggerFeature/Swagger2Feature-EnablingSwaggerUI">Enabling Swagger UI</a>
+<ul class="toc-indentation"><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-AutomaticUIActivation">Automatic
UI Activation</a></li><li><a shape="rect" href="#SwaggerFeature/Swagger2Feature-UnpackingSwaggerUIresources">Unpacking
Swagger UI resources</a></li></ul>
+</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-Setup">Setup</h1><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;dependency&gt;
+    &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
+    &lt;artifactId&gt;cxf-rt-rs-service-description-swagger&lt;/artifactId&gt;
+    &lt;version&gt;3.1.7&lt;/version&gt;
+&lt;/dependency&gt;
+
+</pre>
+</div></div><p>Note that a <strong>cxf-rt-rs-service-description</strong>
needs to be used if older CXF 3.1.x versions are used.</p><p>&#160;</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="co
 nfluenceTd">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="confluenceTd">"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>+</spa
 n></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-ann
 otated 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="confluenceTd">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;
 ...
@@ -242,7 +252,15 @@ import org.apache.cxf.jaxrs.swagger.Swag
     &lt;/servlet-mapping&gt;
     
 &lt;/web-app&gt;</pre>
-</div></div><h1 id="SwaggerFeature/Swagger2Feature-AccessingSwaggerdocuments">Accessing
Swagger documents</h1><p>When Swagger is enabled by Swagger feature, the Swagger
documents will be available at the location URL constructed of the service endpoint location
followed by /swagger.json or /swagger.yaml. For example, if the service endpoint is published
at&#160;http://host:port/serviceroot<a shape="rect" class="external-link" href="http://localhost:9000/,"
rel="nofollow">,</a>&#160;its Swagger documents are available at http://host:port/serviceroot/swagger.json&#160;and&#160;http://host:port/serviceroot/swagger.yaml.</p><p>If
you deploy swagger-ui with your application, you can access these Swagger documents directly.&#160;&#160;For
more details, please look at some of the samples listed below.</p><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 standalone
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_spring"
rel="nofollow">samples/jax_rs/description_swagger2_spring</a>:&#160;Swagger 2.0
standalone 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_web"
rel="nofollow">samples/jax_r
 s/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></div><h1 id="SwaggerFeature/Swagger2Feature-EnablinginSpringBoot">Enabling
in Spring Boot</h1><p>See <a shape="rect" class="external-link" href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot"
rel="nofollow">samples/jax_rs/spring_boot</a> and on how to create Swagger2Feature
in a @Bean method and&#160;<a shape="rect" class="external-link" href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan"
rel="nofollow">samples/jax_rs/spring_boot_scan</a> on how to auto-enable it.</p><p>&#160;</p><h1
id="SwaggerFeature/Swagger2Feature-AccessingSwaggerDocuments">Accessing Swagger Documents</h1><p>When
Swagger is enabled by Swagger feature, the Swagger documents will be available at the location
URL constructed of the service endpoint location followed by /swagger.json or /swagger.yaml.</p><p>For
example, lets assume a JAX-RS endpoint is published at 'http://host:port/context/services
 /' where 'context' is a web application context,&#160; "/services" is a servlet URL.
In this case its Swagger documents are available at 'http://host:port/context/services/swagger.json'
and 'http://host:port/context/services/swagger.yaml'.</p><p>Starting from CXF
3.1.7 the CXF Services page will link to Swagger documents if Swagger2Feature is active.&#160;</p><p>In
the above example, go to&#160;'<span>http://host:port/context/services/</span>services'
and follow a Swagger link which will return a Swagger JSON document.</p><h1 id="SwaggerFeature/Swagger2Feature-EnablingSwaggerUI">Enabling
Swagger UI</h1><p>First one needs to add the following</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;dependency&gt;
+    &lt;groupId&gt;org.webjars&lt;/groupId&gt;
+    &lt;artifactId&gt;swagger-ui&lt;/artifactId&gt;
+    &lt;version&gt;2.1.8-M1&lt;/version&gt;
+&lt;/dependency&gt;
+
+</pre>
+</div></div><h2 id="SwaggerFeature/Swagger2Feature-AutomaticUIActivation">Automatic
UI Activation</h2><p>This feature is available starting from CXF 3.1.7: Adding
a Swagger UI Maven dependency is all what is needed to start accessing Swagger documents with
the help of Swagger UI.</p><p>For example, lets assume a JAX-RS endpoint is published
at '<span>http://host:port/context/services/</span>'.</p><p>Open the
browser and go to '<span>http://host:port/context/services/</span>api-docs?/url=/swagger.json'
which will return a Swagger UI page.</p><p>CXF Services page will also link to
Swagger UI. Go to&#160;'<span>http://host:port/context/services/</span>services'
and follow a Swagger link which will return a Swagger UI page.</p><p>See <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;<a shape="rect"
class="external-link" href=
 "https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot"
rel="nofollow">samples/jax_rs/spring_boot</a> and <a shape="rect" class="external-link"
href="https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan"
rel="nofollow">samples/jax_rs/spring_boot_scan</a>&#160;</p><h2 id="SwaggerFeature/Swagger2Feature-UnpackingSwaggerUIresources">Unpacking
Swagger UI resources</h2><p>Up until CXF 3.1.7 unpacking Swagger UI resources
into the local folder has been the only option. It is demoed in all CXF Swagger demos but
samples/jax_rs/description_swagger2 which</p><p>shows the automatic UI activation.
In CXF 3.1.7: set Swagger2Feature 'supportSwaggerUi' property to 'false' to disable to automatic
UI activation described in the previous section</p><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 standalone
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_spring"
rel="nofollow">samples/jax_rs/description_swagger2_spring</a>:&#160;Swagger 2.0
standalone 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_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 -->
          </td>



Mime
View raw message