cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1030107 - in /websites/production/cxf/content: cache/docs.pageCache docs/openapifeature.html
Date Sun, 20 May 2018 13:56:39 GMT
Author: buildbot
Date: Sun May 20 13:56:39 2018
New Revision: 1030107

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/openapifeature.html

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

Modified: websites/production/cxf/content/docs/openapifeature.html
==============================================================================
--- websites/production/cxf/content/docs/openapifeature.html (original)
+++ websites/production/cxf/content/docs/openapifeature.html Sun May 20 13:56:39 2018
@@ -118,12 +118,12 @@ Apache CXF -- OpenApiFeature
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><h2 id="OpenApiFeature-/*&lt;![CDATA[*/div.rbtoc1524513410589{padding:0px;}div.rbtoc1524513410589ul{list-style:disc;margin-left:0px;}div.rbtoc1524513410589li{margin-left:0px;padding-left:0px;}/*]]&gt;*/#OpenApiFeature-Introduction#OpenApiFeature-IntroductionSetup#OpenA"><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1524513410589 {padding: 0px;}
-div.rbtoc1524513410589 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1524513410589 li {margin-left: 0px;padding-left: 0px;}
+<div id="ConfluenceContent"><h2 id="OpenApiFeature-/*&lt;![CDATA[*/div.rbtoc1526824561156{padding:0px;}div.rbtoc1526824561156ul{list-style:disc;margin-left:0px;}div.rbtoc1526824561156li{margin-left:0px;padding-left:0px;}/*]]&gt;*/#OpenApiFeature-Introduction#OpenApiFeature-IntroductionSetup#OpenA"><style
type="text/css">/*<![CDATA[*/
+div.rbtoc1526824561156 {padding: 0px;}
+div.rbtoc1526824561156 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1526824561156 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></h2><div class="toc-macro rbtoc1524513410589">
+/*]]>*/</style></h2><div class="toc-macro rbtoc1526824561156">
 <ul class="toc-indentation"><li><a shape="rect" href="#OpenApiFeature-"></a></li><li><a
shape="rect" href="#OpenApiFeature-Introduction">Introduction</a></li><li><a
shape="rect" href="#OpenApiFeature-Setup">Setup</a></li><li><a shape="rect"
href="#OpenApiFeature-Properties">Properties</a></li><li><a shape="rect"
href="#OpenApiFeature-ConfiguringfromCode">Configuring from Code</a></li><li><a
shape="rect" href="#OpenApiFeature-ConfiguringfromSpring">Configuring from Spring</a></li><li><a
shape="rect" href="#OpenApiFeature-ConfiguringinBlueprint">Configuring in Blueprint</a></li><li><a
shape="rect" href="#OpenApiFeature-ConfiguringinCXFNonSpringJaxrsServlet">Configuring in
CXFNonSpringJaxrsServlet</a></li><li><a shape="rect" href="#OpenApiFeature-ConfiguringfromPropertyfiles">Configuring
from Property files</a></li><li><a shape="rect" href="#OpenApiFeature-SpringBootAutoConfiguration">Spring
Boot Auto Configuration</a></li><li><a shape="rect" href="#OpenApiFeature-EnablingSwaggerUI">En
 abling Swagger UI</a></li><li><a shape="rect" href="#OpenApiFeature-Samples">Samples</a></li></ul>
 </div><h2 id="OpenApiFeature-Introduction">Introduction</h2><p>The
CXF <strong>OpenApiFeature</strong> allows you to generate <a shape="rect"
class="external-link" href="https://github.com/OAI/OpenAPI-Specification/releases/tag/3.0.0"
rel="nofollow">OpenAPI v3.0</a> documents from JAX-RS service endpoints with a simple
configuration. This feature can be configured programmatically in Java or using Spring or
Blueprint beans.</p><h2 id="OpenApiFeature-Setup">Setup</h2><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;">&lt;dependency&gt;
@@ -131,7 +131,12 @@ div.rbtoc1524513410589 li {margin-left:
     &lt;artifactId&gt;cxf-rt-rs-service-description-openapi-v3&lt;/artifactId&gt;
     &lt;version&gt;3.2.4&lt;/version&gt;
 &lt;/dependency&gt;</pre>
-</div></div><p>The&#160;<strong>cxf-rt-rs-service-description-openapi-v3</strong>
is only available in <strong>3.2.x</strong> and above due to Java 8 baseline.
For older releases, as well as for the users of older Swagger specifications 1.x/2.x, there
is a dedicated converter provided: <span class="confluence-link"><a shape="rect"
href="https://cwiki.apache.org/confluence/display/CXF20DOC/Swagger2Feature">org.apache.cxf.jaxrs.swagger.openapi.SwaggerToOpenApiConversionFilte</a>r</span>.</p><h2
id="OpenApiFeature-Properties">Properties</h2><p><span>The following
optional parameters can be configured in <strong>OpenApiFeature</strong>. Note
that although there are some similarities with Swagger specifications 1.x/2.x, <a shape="rect"
class="external-link" href="https://github.com/OAI/OpenAPI-Specification/releases/tag/3.0.0"
rel="nofollow">OpenAPI v3.0</a> is a significant revamp of the specification (in
a good sense of it).</span></p><div class="table-wrap"><table class="confluenceTab
 le"><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 value (if applicable)</th><th colspan="1" rowspan="1"
class="confluenceTh">Sample value (if applicable)</th><th colspan="1" rowspan="1"
class="confluenceTh">&#160;</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">configLocation</td><td colspan="1" rowspan="1" class="confluenceTd"><p>the
OpenAPI configuration location</p></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">/openapi-configuration.yml</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">propertiesLocation</td><td colspan="1"
rowspan="1" class="confluenceTd">the properties file location</td><td colspan="1"
rowspan="1" class="confluenceTd">/swagger.properties</td><td colspan="1" rowspan="1"

 class="confluenceTd">&#160;/swagger.properties</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">securityDefinitions</td><td colspan="1" rowspan="1" class="confluenceTd">a
list of security definitions<strong>*</strong></td><td colspan="1" rowspan="1"
class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd"><p>["basicAuth"
-&gt; new SecurityScheme().type(Type.HTTP))]</p></td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">customizer</td><td colspan="1" rowspan="1" class="confluenceTd">the
customizer class instance</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">new OpenApiCustomizer()</td><td colspan="1"
rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">swaggerUiMavenGroupAndArtifact</td><td colspan="1"
rowspa
 n="1" class="confluenceTd">the Maven artifacts to pinpoint SwaggerUI</td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"org.webjars.swagger-ui'</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">swaggerUiVersion</td><td colspan="1" rowspan="1" class="confluenceTd">the
version of SwaggerUI</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">"3.13.0"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">supportSwaggerUi</td><td colspan="1" rowspan="1" class="confluenceTd">turns
on/off SwaggerUI support</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>null
(== true)</strong></td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" 
 rowspan="1" class="confluenceTd">filterClass</td><td colspan="1" rowspan="1"
class="confluenceTd">a security filter<strong>*</strong><strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"com.example.filter.SampleFilter"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">resourceClasses</td><td colspan="1" rowspan="1" class="confluenceTd">a
list of resource classes which must be scanned<strong>*</strong><strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">["com.example.rest.SampleResource"]</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">resourcePackages</td><td colspan="1" rowspan="1" class="confluenceTd">a
list of package names where resources must be scanned<strong>*</strong><strong>*</s
 trong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">["com.example.rest"]</td><td colspan="1"
rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">ignoredRoutes</td><td colspan="1" rowspan="1"
class="confluenceTd">excludes specific paths when scanning all resources (see scanAllResources)<span><strong>*</strong><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">["/api/test"]</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">prettyPrint</td><td colspan="1" rowspan="1"
class="confluenceTd">when generating openapi.json, pretty-print the JSON document<span><strong>*</strong><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td><td
colspan="1" rowspan="1" class="confluenc
 eTd">true</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</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"><strong>false</strong></td><td colspan="1" rowspan="1"
class="confluenceTd">false</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">scan</td><td colspan="1" rowspan="1"
class="confluenceTd">Scan all JAX-RS resources automatically</td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>true</strong></td><td colspan="1"
rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">readAllResources</td><td colspan="1"
rowspan="1" class="confluenceTd"><span>Read all operations also with no @Operation<strong>*</strong><strong>*</strong></span
 ><span>&#160;</span></td><td colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</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><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">licenseUrl</td><td colspan="1" rowspan="1"
class="confluenceTd">the license URL<strong>*</strong></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">"<span
class="nolink"><a shape="rect" class="external-link" href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/L
 ICENSE-2.0.html</a></span>"</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">license</td><td colspan="1" rowspan="1"
class="confluenceTd">the license<span><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"Apache 2.0 License"</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">contactUrl</td><td colspan="1" rowspan="1"
class="confluenceTd">the contact link<strong>*</strong></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">contactEmail</td><td colspan="1"
rowspan="1" class="confluenceTd">the contact email<strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceT
 d">null</td><td colspan="1" rowspan="1" class="confluenceTd">"users@<a
shape="rect" href="http://cxf.apache.org">cxf.apache.org</a>"</td><td colspan="1"
rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">contactName</td><td colspan="1" rowspan="1" class="confluenceTd">the
contact name<strong>*</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">description</td><td colspan="1" rowspan="1" class="confluenceTd">the
description<span><strong>*</strong></span></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">"The
Sample REST Application with OpenAPI integration"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">titl
 e</td><td colspan="1" rowspan="1" class="confluenceTd">the title<span><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"Sample REST Application"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">version</td><td colspan="1" rowspan="1" class="confluenceTd">the
version<span><strong>*</strong></span></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">"1.0.0"</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr></tbody></table></div><p><span><strong>*</strong>
- t<span>he properties are defined in the OpenAPI class</span></span></p><p><span><span>&#160;</span><span><strong>*</strong></span><span><strong>*</strong></span>
- <span>t<span>he properties are defined in the&#160;SwaggerConfiguration
class</span></span></span></p><h2 id="OpenApiFeature-Configuri
 ngfromCode">Configuring from Code</h2><div class="code panel pdl" style="border-width:
1px;"><div class="codeContent panelContent pdl">
+</div></div><p>The&#160;<strong>cxf-rt-rs-service-description-openapi-v3</strong>
is only available in <strong>3.2.x</strong> and above due to Java 8 baseline.
For older releases, as well as for the users of older Swagger specifications 1.x/2.x, there
is a dedicated converter provided: <span class="confluence-link"><a shape="rect"
href="https://cwiki.apache.org/confluence/display/CXF20DOC/Swagger2Feature">org.apache.cxf.jaxrs.swagger.openapi.SwaggerToOpenApiConversionFilte</a>r</span>.</p><h2
id="OpenApiFeature-Properties">Properties</h2><p><span>The following
optional parameters can be configured in <strong>OpenApiFeature</strong>. Note
that although there are some similarities with Swagger specifications 1.x/2.x, <a shape="rect"
class="external-link" href="https://github.com/OAI/OpenAPI-Specification/releases/tag/3.0.0"
rel="nofollow">OpenAPI v3.0</a> is a significant revamp of the specification (in
a good sense of it).</span></p><div class="table-wrap"><table class="confluenceTab
 le"><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 value (if applicable)</th><th colspan="1" rowspan="1"
class="confluenceTh">Sample value (if applicable)</th><th colspan="1" rowspan="1"
class="confluenceTh">&#160;</th></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">configLocation</td><td colspan="1" rowspan="1" class="confluenceTd"><p>the
OpenAPI configuration location</p></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">/config/openapi-configuration.yml</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">scanKnownConfigLocations</td><td
colspan="1" rowspan="1" class="confluenceTd"><p>scan known OpenAPI configuration
location (classpath or filesystem), which are:</p><div class="preformatted panel"
sty
 le="border-width: 1px;"><div class="preformattedContent panelContent">
+<pre>openapi-configuration.yaml
+openapi-configuration.json
+openapi.yaml
+openapi.json</pre>
+</div></div></td><td colspan="1" rowspan="1" class="confluenceTd">true</td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">propertiesLocation</td><td colspan="1" rowspan="1" class="confluenceTd">the
properties file location</td><td colspan="1" rowspan="1" class="confluenceTd">/swagger.properties</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;/swagger.properties</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">securityDefinitions</td><td colspan="1"
rowspan="1" class="confluenceTd">a list of security definitions<strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd"><p>["basicAuth" -&gt; new SecurityScheme().type(Type.HTTP))]</p></td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr>
 <td colspan="1" rowspan="1" class="confluenceTd">customizer</td><td colspan="1"
rowspan="1" class="confluenceTd">the customizer class instance</td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">new
OpenApiCustomizer()</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">swaggerUiMavenGroupAndArtifact</td><td
colspan="1" rowspan="1" class="confluenceTd">the Maven artifacts to pinpoint SwaggerUI</td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"org.webjars.swagger-ui'</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">swaggerUiVersion</td><td colspan="1" rowspan="1" class="confluenceTd">the
version of SwaggerUI</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">"3.13.0
 "</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">supportSwaggerUi</td><td colspan="1"
rowspan="1" class="confluenceTd">turns on/off SwaggerUI support</td><td colspan="1"
rowspan="1" class="confluenceTd"><strong>null (== true)</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">filterClass</td><td colspan="1" rowspan="1" class="confluenceTd">a
security filter<strong>*</strong><strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"com.example.filter.SampleFilter"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">resourceClasses</td><td colspan="1" rowspan="1" class="confluenceTd">a
list of resource classes which must be scanned<str
 ong>*</strong><strong>*</strong></td><td colspan="1" rowspan="1"
class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">["com.example.rest.SampleResource"]</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">resourcePackages</td><td colspan="1"
rowspan="1" class="confluenceTd">a list of package names where resources must be scanned<strong>*</strong><strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">["com.example.rest"]</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">ignoredRoutes</td><td colspan="1"
rowspan="1" class="confluenceTd">excludes specific paths when scanning all resources (see
scanAllResources)<span><strong>*</strong><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1
 " class="confluenceTd">["/api/test"]</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">prettyPrint</td><td colspan="1" rowspan="1"
class="confluenceTd">when generating openapi.json, pretty-print the JSON document<span><strong>*</strong><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</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"><strong>false</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">false</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">scan</td><td colspan="1" rowspan="1" class="confluenceTd"
 >Scan all JAX-RS resources automatically</td><td colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">readAllResources</td><td colspan="1" rowspan="1" class="confluenceTd"><span>Read
all operations also with no @Operation<strong>*</strong><strong>*</strong></span><span>&#160;</span></td><td
colspan="1" rowspan="1" class="confluenceTd"><strong>true</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">true</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</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><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">null</td><td colspan="1" r
 owspan="1" class="confluenceTd">&#160;</td></tr><tr><td colspan="1"
rowspan="1" class="confluenceTd">licenseUrl</td><td colspan="1" rowspan="1" class="confluenceTd">the
license URL<strong>*</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">"<span class="nolink"><a shape="rect"
class="external-link" href="http://www.apache.org/licenses/LICENSE-2.0.html">http://www.apache.org/licenses/LICENSE-2.0.html</a></span>"</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">license</td><td colspan="1" rowspan="1"
class="confluenceTd">the license<span><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"Apache 2.0 License"</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">contactUrl</td><td colspan="1" r
 owspan="1" class="confluenceTd">the contact link<strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">contactEmail</td><td colspan="1"
rowspan="1" class="confluenceTd">the contact email<strong>*</strong></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"users@<a shape="rect" href="http://cxf.apache.org">cxf.apache.org</a>"</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">contactName</td><td colspan="1" rowspan="1"
class="confluenceTd">the contact name<strong>*</strong></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr>
 <tr><td colspan="1" rowspan="1" class="confluenceTd">description</td><td
colspan="1" rowspan="1" class="confluenceTd">the description<span><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"The Sample REST Application with OpenAPI integration"</td><td
colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr><tr><td
colspan="1" rowspan="1" class="confluenceTd">title</td><td colspan="1" rowspan="1"
class="confluenceTd">the title<span><strong>*</strong></span></td><td
colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1"
class="confluenceTd">"Sample REST Application"</td><td colspan="1" rowspan="1"
class="confluenceTd">&#160;</td></tr><tr><td colspan="1" rowspan="1"
class="confluenceTd">version</td><td colspan="1" rowspan="1" class="confluenceTd">the
version<span><strong>*</strong></span></td><td colspan="1"
rowspan="1" class="confluenceTd">null</td><td colspan="1" row
 span="1" class="confluenceTd">"1.0.0"</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td></tr></tbody></table></div><p><span><strong>*</strong>
- t<span>he properties are defined in the OpenAPI class</span></span></p><p><span><span>&#160;</span><span><strong>*</strong></span><span><strong>*</strong></span>
- <span>t<span>he properties are defined in the&#160;SwaggerConfiguration
class</span></span></span></p><h2 id="OpenApiFeature-ConfiguringfromCode">Configuring
from Code</h2><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.jaxrs.openapi.OpenApiFeature;
 import io.swagger.v3.oas.models.security.SecurityScheme;
 import io.swagger.v3.oas.models.security.SecurityScheme.Type;
@@ -241,7 +246,7 @@ feature.setSecurityDefinitions(Collectio
     &lt;/servlet-mapping&gt;
      
 &lt;/web-app&gt;</pre>
-</div></div><h2 id="OpenApiFeature-ConfiguringfromPropertyfiles">Configuring
from Property files</h2><p>It is possible to supply the configuration from the
property files. The default location for a properties file is "<strong>/swagger.properties</strong>".
<strong>OpenApiFeature</strong> will pick it up if it is available, and the location
can be overridden with a<strong> 'propertiesLocation</strong>' property.&#160;
Additionally, the complete OpenAPI configuration could be supplied from the property file
(usually <strong>openapi-configuration.json</strong> or <strong>openapi-configuration.yml</strong>),
controlled by '<strong>configLocation'</strong> property. Please take into account
that there is a certain level of the overlap between both.</p><p>Note that the
properties, if available, do not override the properties which may have been set as suggested
above from the code or Spring/Blueprint contexts or web.xml. Instead they complement and serve
as the default configuration prop
 erties: for example, if some properties have been set from the code then the values for the
same properties found in the properties file will not be used.</p><h2 id="OpenApiFeature-SpringBootAutoConfiguration">Spring
Boot Auto Configuration</h2><p>Please consult <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 <strong>OpenApiFeature</strong>
as a @Bean or/and&#160;<a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml#L13"
rel="nofollow">samples/jax_rs/spring_boot_scan</a> on how to auto-enable it.</p><h2
id="OpenApiFeature-EnablingSwaggerUI">Enabling Swagger UI</h2><p>Adding a Swagger
UI Maven dependency is all what is needed to start accessing Swagger documents with the help
of Swagge
 r UI.</p><div class="syntaxhighlighter nogutter xml"><p>&#160;</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+</div></div><h2 id="OpenApiFeature-ConfiguringfromPropertyfiles">Configuring
from Property files</h2><p>It is possible to supply the configuration from the
property files. The default location for a properties file is "<strong>/swagger.properties</strong>".
<strong>OpenApiFeature</strong> will pick it up if it is available, and the location
can be overridden with a<strong> 'propertiesLocation</strong>' property.&#160;
Additionally, the complete OpenAPI configuration could be supplied from the property file
(usually <strong>openapi-configuration.json</strong> or <strong>openapi-configuration.yml</strong>),
controlled by '<strong>configLocation'</strong> property. By default,&#160;<strong>OpenApiFeature</strong>
scans for known&#160;OpenAPI configuration locations and loads them if available (the
behavior could be switched off by setting <strong>scanKnownConfigLocations</strong>
to <strong>false</strong>). Please take into account that there is a certain level
of the overlap between b
 oth.</p><p>Note that the properties, if available, do not override the properties
which may have been set as suggested above from the code or Spring/Blueprint contexts or web.xml.
Instead they complement and serve as the default configuration properties: for example, if
some properties have been set from the code then the values for the same properties found
in the properties file will not be used.</p><h2 id="OpenApiFeature-SpringBootAutoConfiguration">Spring
Boot Auto Configuration</h2><p>Please consult <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 <strong>OpenApiFeature</strong>
as a @Bean or/and&#160;<a shape="rect" class="external-link" href="https://github.com/apache/cxf/blob/master/distribution/src/main/release/samples/jax_rs/spring_boot_scan/application/src/main/resources/application.yml#L13"
rel="nofollow">sample
 s/jax_rs/spring_boot_scan</a> on how to auto-enable it.</p><h2 id="OpenApiFeature-EnablingSwaggerUI">Enabling
Swagger UI</h2><p>Adding a Swagger UI Maven dependency is all what is needed to
start accessing Swagger documents with the help of Swagger UI.</p><div class="syntaxhighlighter
nogutter xml"><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;">&lt;dependency&gt;
     &lt;groupId&gt;org.webjars&lt;/groupId&gt;
     &lt;artifactId&gt;swagger-ui&lt;/artifactId&gt;



Mime
View raw message