cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1006930 - in /websites/production/cxf/content: cache/docs.pageCache docs/jaxrs-services-description.html
Date Fri, 17 Feb 2017 13:47:52 GMT
Author: buildbot
Date: Fri Feb 17 13:47:52 2017
New Revision: 1006930

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/jaxrs-services-description.html

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

Modified: websites/production/cxf/content/docs/jaxrs-services-description.html
==============================================================================
--- websites/production/cxf/content/docs/jaxrs-services-description.html (original)
+++ websites/production/cxf/content/docs/jaxrs-services-description.html Fri Feb 17 13:47:52
2017
@@ -117,12 +117,12 @@ Apache CXF -- JAXRS Services Description
          <td height="100%">
            <!-- Content -->
            <div class="wiki-content">
-<div id="ConfluenceContent"><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;<span
class="inline-first-p" style="font-size:2em;font-weight:bold">JAX-RS Services Description</span>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1478623622087 {padding: 0px;}
-div.rbtoc1478623622087 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1478623622087 li {margin-left: 0px;padding-left: 0px;}
+<div id="ConfluenceContent"><p><span class="inline-first-p" style="font-size:2em;font-weight:bold">JAX-RS
Services Description</span>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p><style
type="text/css">/*<![CDATA[*/
+div.rbtoc1487339236292 {padding: 0px;}
+div.rbtoc1487339236292 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1487339236292 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1478623622087">
+/*]]>*/</style></p><div class="toc-macro rbtoc1487339236292">
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-Swagger">Swagger</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#JAXRSServicesDescription-Swagger-FirstDevelopment">Swagger-First
Development</a></li><li><a shape="rect" href="#JAXRSServicesDescription-SwaggerAutoGeneration">Swagger
Auto Generation</a></li></ul>
 </li><li><a shape="rect" href="#JAXRSServicesDescription-WADL">WADL</a>
@@ -362,7 +362,7 @@ public Book addBook(@Description("book i
 </div></div><h4 id="JAXRSServicesDescription-SupportforJavadoc">Support
for Javadoc</h4><p>In CXF 3.0.0 one can get the Javadoc documentation copied to
WADL being auto-generated at runtime.</p><p>org.apache.cxf.jaxrs.model.wadl.JavaDocProvider
implements org.apache.cxf.jaxrs.model.wadl.DocumentationProvider and can be set as WADLGenerator
"documentationProvider" property.</p><p>JavaDocProvider can be customized with
URL or relative String path pointing to the generated Javadoc jar, so this jar can be shipped
in the application war or located elsewhere.</p><p>JavaDocProvider parses the
generated Javadoc HTML pages and scrapes the documentation. See Java to Wadl section on the
alternative approach for supporting Javadoc.</p><h3 id="JAXRSServicesDescription-CustomizingWADLGeneration">Customizing
WADL Generation</h3><p>One can register a custom WadlGenerator as a jaxrs:provider.
The custom generator can extend the default <br clear="none"> org.apache.cxf.jaxrs.model.wadl.WadlGenerator
o
 r register a default one with one of the following properties set.</p><ul class="alternate"><li>wadlNamespace:
default is "http://wadl.dev.java.net/2009/02", the earlier one is "http://research.sun.com/wadl/2006/10".</li><li>singleResourceMultipleMethods:
default is 'true', for example, if a resource class has multiple methods supported at the
same path such as "/" (GET, POST, etc) then WADL will list them all as the child nodes of
a single resource element.</li><li>useSingleSlashResource: default is false, for
example, if you have a root resource class with a path "root" and a resource method with a
path "" or "/" then a WADL resource representing the root will not have a child resource representing
this resource method (it would do if a resource method had a more specific path such as "bar").</li></ul><p>Starting
from CXF 2.4.1 and 2.3.5 the following properties are also supported:</p><ul class="alternate"><li>applicationTitle:
can be used to create an application title.</li><li>n
 amespacePrefix: defaut is 'prefix', it can be set to other value such as 'ns'.</li><li>ignoreForwardSlash:
can be used to enforce that resource path values do not start from '/'</li><li>addResourceAndMethodIds:
WadlGenerator will add "id" attributes to wadl:resource and wadl:method elements</li></ul><p>An
<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/wadl/ElementClass.java">ElementClass</a>
annotation can help with representing JAX-RS Response elements in the generated WADL.</p><h4
id="JAXRSServicesDescription-RepresentingexplicitJAXBcollections">Representing explicit
JAXB collections</h4><p>Starting from CXF 2.5.5 and 2.6.2 it is possible to get
explicit collections represented in generated WADL grammar sections and have WADL representations
linking to these schema elements. Note it is only possible for JAXB collections, for example:</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;">@GET
 @Path("books")
-@org.apache.cxf.jaxrs.model.wadl.XMLName("{http://books}books")
+@org.apache.cxf.jaxrs.model.xml.XMLName("{http://books}books")
 public List&lt;Book&gt; getBooks() {...}
 </pre>
 </div></div><p>Given the above example, WADLGenerator will attempt to add
a 'books' element to the generated schema with the targetNamespace set to "http://books".
This 'books' element will have a sequence of elements linking to a type representing the "Book"
class.</p><h4 id="JAXRSServicesDescription-RepresentingexternalschemasandnonJAXBtypes">Representing
external schemas and non JAXB types</h4><p>By default, the WADL grammar section
will be properly generated if resource methods accept or return JAXB types.</p><p>Even
when you do use JAXB, the JAXB types may have been generated from the external schema so having
WadlGenerator attempting to recreate the original schema may not work well. To have a generated
WADL referencing the original schema(s) please set a 'schemaLocations' list property (programmatically
or from Spring) :</p><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">



Mime
View raw message