Author: buildbot Date: Mon Dec 7 04:19:22 2015 New Revision: 974807 Log: Production update by buildbot for camel
Modified: websites/production/camel/content/cache/main.pageCache websites/production/camel/content/rest-dsl.html Modified: websites/production/camel/content/cache/main.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/camel/content/rest-dsl.html ============================================================================== --- websites/production/camel/content/rest-dsl.html (original) +++ websites/production/camel/content/rest-dsl.html Mon Dec 7 04:19:22 2015 @@ -289,7 +289,7 @@ public class UserPojo { .setBody().constant("Invalid json data"); ]]></script> -</div></div><p> </p><h3 id="RestDSL-IntegrationaCamelcomponentwithRestDSL">Integration a Camel component with Rest DSL</h3><p>Any Apache Camel component can integrate with the Rest DSL if they can be used as a REST service (eg as a REST consumer in Camel lingo). To integrate with the Rest DSL, then the component should implement the <code>org.apache.camel.spi.RestConsumerFactory</code>. The Rest DSL will then invoke the <code>createConsumer</code> method when it setup the Camel routes from the defined DSL. The component should then implement logic to create a Camel consumer that exposes the REST services based on the given parameters, such as path, verb, and other options. For example see the source code for camel-restlet, camel-spark-rest.</p><h3 id="RestDSL-SwaggerAPI">Swagger API</h3><p>The Rest DSL supports <a shape="rect" href="swagger-java.html">Swagger Java</a> by the <code>camel-swagger-java</code> module. See more details at  <a shape="rect" hr ef="swagger-java.html">Swagger</a> and the <code>camel-swagger-java</code> example from the Apache Camel distribution.</p><p>From <strong>Camel 2.16</strong> onwards you can define each parameter fine grained with details such as name, description, data type, parameter type and so on, using the <param>. For example to define the id path parameter you can do as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> +</div></div><p> </p><h3 id="RestDSL-IntegratingaCamelcomponentwithRestDSL">Integrating a Camel component with Rest DSL</h3><p>Any Apache Camel component can integrate with the Rest DSL if they can be used as a REST service (eg as a REST consumer in Camel lingo). To integrate with the Rest DSL, then the component should implement the <code>org.apache.camel.spi.RestConsumerFactory</code>. The Rest DSL will then invoke the <code>createConsumer</code> method when it setup the Camel routes from the defined DSL. The component should then implement logic to create a Camel consumer that exposes the REST services based on the given parameters, such as path, verb, and other options. For example see the source code for camel-restlet, camel-spark-rest.</p><h3 id="RestDSL-SwaggerAPI">Swagger API</h3><p>The Rest DSL supports <a shape="rect" href="swagger-java.html">Swagger Java</a> by the <code>camel-swagger-java</code> module. See more details at  <a shape="rect" hr ef="swagger-java.html">Swagger</a> and the <code>camel-swagger-java</code> example from the Apache Camel distribution.</p><p>From <strong>Camel 2.16</strong> onwards you can define each parameter fine grained with details such as name, description, data type, parameter type and so on, using the <param>. For example to define the id path parameter you can do as shown below:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl"> <script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[<!-- this is a rest GET to view an user by the given id --> <get uri="/{id}" outType="org.apache.camel.example.rest.User"> <description>Find user by id</description>