You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2015/09/23 14:18:42 UTC

svn commit: r966478 - in /websites/production/camel/content: cache/main.pageCache swagger.html

Author: buildbot
Date: Wed Sep 23 12:18:41 2015
New Revision: 966478

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/swagger.html

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

Modified: websites/production/camel/content/swagger.html
==============================================================================
--- websites/production/camel/content/swagger.html (original)
+++ websites/production/camel/content/swagger.html Wed Sep 23 12:18:41 2015
@@ -84,7 +84,15 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Swagger-SwaggerComponent">Swagger Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The &#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a>&#160;can be integrated with the&#160;<code>camel-swagger</code> module which is used for exposing the REST services and their APIs using <a shape="rect" class="external-link" href="http://swagger.wordnik.com/" rel="nofollow">Swagger</a>.</p><p>Maven users will need to add the following dependency to their&#160;<code>pom.xml</code>&#160;for this component:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<div class="wiki-content maincontent"><h2 id="Swagger-SwaggerComponent">Swagger Component</h2><p><strong>Available as of Camel 2.14</strong></p><p>The &#160;<a shape="rect" href="rest-dsl.html">Rest DSL</a>&#160;can be integrated with the&#160;<code>camel-swagger</code> module which is used for exposing the REST services and their APIs using <a shape="rect" class="external-link" href="http://swagger.wordnik.com/" rel="nofollow">Swagger</a>.</p><p>Maven users will need to add the following dependency to their&#160;<code>pom.xml</code>&#160;for this component:</p><p>From&#160;<strong>Camel 2.16</strong> onwards the swagger component is purely Java based, and its&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
+    &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
+    &lt;artifactId&gt;camel-swagger-java&lt;/artifactId&gt;
+    &lt;version&gt;x.x.x&lt;/version&gt;
+    &lt;!-- use the same version as your Camel core version --&gt;
+&lt;/dependency&gt;
+]]></script>
+</div></div><p>And the old Scala based camel-swagger module is deprecated, and to be removed in a future release.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[&lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-swagger&lt;/artifactId&gt;
@@ -92,7 +100,7 @@
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
 ]]></script>
-</div></div><h3 id="Swagger-UsingwithCamel2.15onwards">Using with Camel 2.15 onwards</h3><p>The default servlet supports any environment using JMX to discover the CamelContext(s) to use.</p><p>The name of the servlet is&#160;<code>org.apache.camel.component.swagger.DefaultCamelSwaggerServlet</code>.</p><h3 id="Swagger-UsingwithCamel2.14.x">Using with Camel 2.14.x</h3><p>The Swagger servlet is integrated with Spring or&#160;<a shape="rect" href="servletlistener-component.html">ServletListener Component</a>.&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Component</th><th colspan="1" rowspan="1" class="confluenceTh">Servlet ClassName</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">spring</td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.component.swagger.spring.SpringRestSwaggerApiDeclarationServlet</code>&#160;</td></tr><tr><td colspan="1" rowspan="1" class="confluence
 Td">servletlistener</td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.component.swagger.servletlistener.ServletListenerRestSwaggerApiDeclarationServlet</code></td></tr></tbody></table></div><p>The servlet support the same options when using spring or servletlistener.</p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The servlets above from Camel 2.14.x is deprecated and replaced with a single default servlet from Camel 2.15 onwards.</p></div></div><p>&#160;</p><p>For example when using Spring you need to configure the&#160;<code>org.apache.camel.component.swagger.spring.SpringRestSwaggerApiDeclarationServlet</code>&#160;in the&#160;<code>WEB-INF/web.xml</code>&#160;file as shown below:</p><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-i
 con aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you use Camel 2.15 onwards then just use the default servlet in any kind of environment.</p></div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><h3 id="Swagger-UsingwithCamel2.16onwards">Using with Camel 2.16 onwards</h3><p>The name of the servlet is&#160;<code>org.apache.camel.swagger.servlet.RestSwaggerServlet</code>.</p><p>However some of the Camel components is able to support Swagger API documentation out of the box without having to use a servlet container. For example these components: <a shape="rect" href="jetty.html">Jetty</a>,&#160;<a shape="rect" href="netty-http.html">Netty HTTP</a>,&#160;<a shape="rect" href="netty-http.html">Netty HTTP</a>,&#160;<a shape="rect" href="undertow.html">Undertow</a>. This allows to provide Swagger API in standalone containers that has no servlet container. For an example see the&#160;<code>camel-example-swagger-cdi</code> in the examples directory of the Apache Camel distribution.</p><h3 id="Swagger-UsingwithCamel2.15onwards">Using with Camel 2.15 onwards</h3><p>The default servlet supports any environment using JMX to discover the CamelContext(s) to use.</p><p>The name
  of the servlet is&#160;<code>org.apache.camel.component.swagger.DefaultCamelSwaggerServlet</code>.</p><h3 id="Swagger-UsingwithCamel2.14.x">Using with Camel 2.14.x</h3><p>The Swagger servlet is integrated with Spring or&#160;<a shape="rect" href="servletlistener-component.html">ServletListener Component</a>.&#160;</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh">Component</th><th colspan="1" rowspan="1" class="confluenceTh">Servlet ClassName</th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">spring</td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.component.swagger.spring.SpringRestSwaggerApiDeclarationServlet</code>&#160;</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd">servletlistener</td><td colspan="1" rowspan="1" class="confluenceTd"><code>org.apache.camel.component.swagger.servletlistener.ServletListenerRestSwaggerApiDeclarationServlet</code></td></tr></tbody
 ></table></div><p>The servlet support the same options when using spring or servletlistener.</p><div class="confluence-information-macro confluence-information-macro-warning"><span class="aui-icon aui-icon-small aui-iconfont-error confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The servlets above from Camel 2.14.x is deprecated and replaced with a single default servlet from Camel 2.15 onwards.</p></div></div><p>&#160;</p><p>For example when using Spring you need to configure the&#160;<code>org.apache.camel.component.swagger.spring.SpringRestSwaggerApiDeclarationServlet</code>&#160;in the&#160;<code>WEB-INF/web.xml</code>&#160;file as shown below:</p><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>If you use Camel 2.15 onwards then just use the default servlet in an
 y kind of environment.</p></div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
 <script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[  &lt;!-- to setup Camel Swagger api servlet when using Spring --&gt;
   &lt;servlet&gt;
 Â