svn commit: r1008462 - in /websites/production/camel/content: cache/main.pageCache examples.html rest-swagger-component.html

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

svn commit: r1008462 - in /websites/production/camel/content: cache/main.pageCache examples.html rest-swagger-component.html

buildbot
Author: buildbot
Date: Fri Mar 17 08:19:25 2017
New Revision: 1008462

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/examples.html
    websites/production/camel/content/rest-swagger-component.html

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

Modified: websites/production/camel/content/examples.html
==============================================================================
--- websites/production/camel/content/examples.html (original)
+++ websites/production/camel/content/examples.html Fri Mar 17 08:19:25 2017
@@ -75,7 +75,7 @@
  <tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="Examples-Examples">Examples</h2><p>Once you have read about <a shape="rect" href="getting-started.html">Getting Started</a> and looked at the <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a>, you might want to try out some examples.</p><p>Before starting to work on example you may want to <a shape="rect" href="what-are-the-dependencies.html">check the requirements for working with Camel</a>. Then <a shape="rect" href="running-examples.html">Running Examples</a> describes how to get the examples to run</p><h3 id="Examples-Walk-throughs">Walk-throughs</h3><ul><li>Walk through the code of a <a shape="rect" href="walk-through-an-example.html">beginner's example</a> so you can understand how things fit together using the Java <a shape="rect" href="dsl.html">DSL</a> to set up some routes in a simple <code>main(&#8230;)</code> method.</li><li>Walk through the <a shape="rect" href="walk-through-anot
 her-example.html">Spring DSL example</a> to look at XML-based routing.</li><li>Walk through the <a shape="rect" href="console-example.html">Console Example</a> to practice reading input from the console.</li></ul><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Notice</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The examples listed below are hosted at Apache. We also offer the <a shape="rect" href="articles.html">Articles</a> page as a collection of 3rd-party Camel material - such as tutorials, blog posts, published articles, videos, podcasts, presentations, and so forth.</p><p>If you have written a Camel-related article, then we are happy to provide a link to it. You can contact the Camel <a shape="rect" href="team.html">Team</a> via our <a shape="rect" href="mailing-lists.html">Mailing Lists</a>, or simply post a tweet with the
  words "Apache Camel".</p></div></div><h3 id="Examples-Examples.1"><br clear="none">Examples</h3><p>Browse the examples from github where each example is documented and up to date:</p><p><a shape="rect" class="external-link" href="https://github.com/apache/camel/tree/master/examples" rel="nofollow">https://github.com/apache/camel/tree/master/examples</a></p><p>&#160;</p><h3 id="Examples-SeeAlso">See Also</h3><ul><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li></ul></div>
+<div class="wiki-content maincontent"><h2 id="Examples-Examples">Examples</h2><p>Once you have read about <a shape="rect" href="getting-started.html">Getting Started</a> and looked at the <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a>, you might want to try out some examples.</p><p>Before starting to work on example you may want to <a shape="rect" href="what-are-the-dependencies.html">check the requirements for working with Camel</a>. Then <a shape="rect" href="running-examples.html">Running Examples</a> describes how to get the examples to run</p><h3 id="Examples-Walk-throughs">Walk-throughs</h3><ul><li>Walk through the code of a <a shape="rect" href="walk-through-an-example.html">beginner's example</a> so you can understand how things fit together using the Java <a shape="rect" href="dsl.html">DSL</a> to set up some routes in a simple <code>main(&#8230;)</code> method.</li><li>Walk through the <a shape="rect" href="walk-through-anot
 her-example.html">Spring DSL example</a> to look at XML-based routing.</li><li>Walk through the <a shape="rect" href="console-example.html">Console Example</a> to practice reading input from the console.</li></ul><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Notice</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>The examples listed below are hosted at Apache. We also offer the <a shape="rect" href="articles.html">Articles</a> page as a collection of 3rd-party Camel material - such as tutorials, blog posts, published articles, videos, podcasts, presentations, and so forth.</p><p>If you have written a Camel-related article, then we are happy to provide a link to it. You can contact the Camel <a shape="rect" href="team.html">Team</a> via our <a shape="rect" href="mailing-lists.html">Mailing Lists</a>, or simply post a tweet with the
  words "Apache Camel".</p></div></div><h3 id="Examples-Examples.1"><br clear="none">Examples</h3><p>Browse the examples from github where each example is documented and up to date:</p><p><a shape="rect" class="external-link" href="https://github.com/apache/camel/tree/master/examples" rel="nofollow">https://github.com/apache/camel/tree/master/examples#welcome-to-the-apache-camel-examples</a></p><p>&#160;</p><h3 id="Examples-SeeAlso">See Also</h3><ul><li><a shape="rect" href="tutorials.html">Tutorials</a></li><li><a shape="rect" href="cookbook.html">Cookbook</a></li><li><a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a></li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/rest-swagger-component.html
==============================================================================
--- websites/production/camel/content/rest-swagger-component.html (original)
+++ websites/production/camel/content/rest-swagger-component.html Fri Mar 17 08:19:25 2017
@@ -94,10 +94,10 @@
 &lt;/dependency&gt;]]></script>
 </div></div><h3 id="RESTSwaggerComponent-URIformat">URI format</h3><p>&#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[rest-swagger:[specificationPath#]operationId]]></script>
-</div></div><p>Where <strong>operationId</strong> is the ID of the operation in the Swagger specification, and <strong>specificationPath</strong> is the path to the specification.<br clear="none">If the `specificationPath` is not specified it defaults to <strong>swagger.json</strong>. The lookup mechanism uses Camel's <em>ResourceHelper</em> to load the resource, which means that you can use CLASSPATH resources (<em>classpath:my-specification.json</em>), files (<em>file:/some/path.json</em>), the web (<em><span class="nolink">http://api.example.com/swagger.json</span>) </em>or reference a bean (<em>ref:nameOfBean</em>) or use a method of a bean (<em>bean:nameOfBean.methodName</em>) to get the specification resource, failing that Swagger's own resource loading support.</p><p>This component does not act as a HTTP client, it delegates that to another component mentioned above. The lookup mechanism searches for a single component that implements the <em>RestProducerFactory</em> interfac
 e and uses that. If the CLASSPATH contains more than one, then the property <strong>componentName</strong> should be set to indicate which component to delegate to.<br clear="none"><br clear="none">Most of the configuration is taken from the Swagger specification but the option exists to override those by specifying them on the component or on the endpoint. Typically you would just need to override the <strong>host</strong> or <strong>basePath</strong> if those differ from the specification.<br clear="none"><br clear="none"><strong>NOTE:</strong> The <strong>host</strong> parameter should contain the absolute URI containing scheme, hostname and port number, for instance <em><span class="nolink">https://api.example.com</span></em>.<br clear="none"><br clear="none">With <strong>componentName</strong> you specify what component is used to perform the requests, this named component needs to be present in the Camel context and implement the required <em>RestProducerFactory</em> interface
  - as do the components listed at the top.<br clear="none"><br clear="none">If you do not specify the <strong>componentName</strong> at either component or endpoint level, CLASSPATH is searched for a suitable delegate. There should be only one component present on the CLASSPATH that implements the <em>RestProducerFactory</em> interface for this to work.<br clear="none"></p><p>&#160;</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>basePath</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>""</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>API basePath for example /v2. Default is unset if set overrides the value pres
 ent in Swagger specification.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>componentName</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">Name of the Camel component that will perform the requests. The compnent must be present in Camel registry and it must implement RestProducerFactory service provider interface. If not set CLASSPATH is searched for single component that implements RestProducerFactory SPI. Can be overriden in endpoint configuration.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>consumes</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="confluenceTd">What payload type this component capable of consuming. Could be one type like application/json or multiple types as application/json application/xml; q=0.5 according to the RFC7231. This equates to the value of Accept HTTP header. If set overri
 des any value found in the Swagger specification. Can be overriden in endpoint configuration</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>host</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="bare confluenceTd">Scheme hostname and port to direct the HTTP requests to in the form of http[s]://hostname:port. Can be configured at the endpoint component or in the correspoding REST configuration in the Camel Context. If you give this component a name (e.g. petstore) that REST configuration is consulted first rest-swagger next and global configuration last. If set overrides any value found in the Swagger specification RestConfiguration. Can be overriden in endpoint configuration.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>produces</strong></td><td colspan="1" rowspan="1" class="confluenceTd">null</td><td colspan="1" rowspan="1" class="bare confluenceTd">What payload type this compon
 ent is producing. For example application/json according to the RFC7231. This equates to the value of Content-Type HTTP header. If set overrides any value present in the Swagger specification. Can be overriden in endpoint configuration.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>specificationUri</strong></td><td colspan="1" rowspan="1" class="confluenceTd">"swagger.json"</td><td colspan="1" rowspan="1" class="bare confluenceTd">Path to the Swagger specification file. The scheme host base path are taken from this specification but these can be overriden with properties on the component or endpoint level. If not given the component tries to load swagger.json resource. Can be overriden in endpoint configuration.</td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><strong>operationId</strong></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="bare confluenceTd"><strong>Endpoint only</strong>, the ID of
 the operation from the Swagger specification.</td></tr></tbody></table></div></div>
+</div></div><p>Where <strong>operationId</strong> is the ID of the operation in the Swagger specification, and <strong>specificationPath</strong> is the path to the specification.<br clear="none">If the `specificationPath` is not specified it defaults to <strong>swagger.json</strong>. The lookup mechanism uses Camel's <em>ResourceHelper</em> to load the resource, which means that you can use CLASSPATH resources (<em>classpath:my-specification.json</em>), files (<em>file:/some/path.json</em>), the web (<em><span class="nolink">http://api.example.com/swagger.json</span>) </em>or reference a bean (<em>ref:nameOfBean</em>) or use a method of a bean (<em>bean:nameOfBean.methodName</em>) to get the specification resource, failing that Swagger's own resource loading support.</p><p>This component does not act as a HTTP client, it delegates that to another component mentioned above. The lookup mechanism searches for a single component that implements the <em>RestProducerFactory</em> interfac
 e and uses that. If the CLASSPATH contains more than one, then the property <strong>componentName</strong> should be set to indicate which component to delegate to.<br clear="none"><br clear="none">Most of the configuration is taken from the Swagger specification but the option exists to override those by specifying them on the component or on the endpoint. Typically you would just need to override the <strong>host</strong> or <strong>basePath</strong> if those differ from the specification.<br clear="none"><br clear="none"><strong>NOTE:</strong> The <strong>host</strong> parameter should contain the absolute URI containing scheme, hostname and port number, for instance <em><span class="nolink">https://api.example.com</span></em>.<br clear="none"><br clear="none">With <strong>componentName</strong> you specify what component is used to perform the requests, this named component needs to be present in the Camel context and implement the required <em>RestProducerFactory</em> interface
  - as do the components listed at the top.<br clear="none"><br clear="none">If you do not specify the <strong>componentName</strong> at either component or endpoint level, CLASSPATH is searched for a suitable delegate. There should be only one component present on the CLASSPATH that implements the <em>RestProducerFactory</em> interface for this to work.</p><div class="confluenceTableSmall"><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Value</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>basePath</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>""</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>API basePath for example /v2. Default is unset if set overrides the value present in Swagger specificati
 on.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>componentName</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Name of the Camel component that will perform the requests. The compnent must be present in Camel registry and it must implement RestProducerFactory service provider interface. If not set CLASSPATH is searched for single component that implements RestProducerFactory SPI. Can be overriden in endpoint configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>consumes</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>What payload type this component capable of consuming. Could be one type like application/json or multiple types as application/json application/xml; q=0.5 according to the RFC7231. This equates to the value of Accept HTTP header. I
 f set overrides any value found in the Swagger specification. Can be overriden in endpoint configuration</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>host</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" class="bare confluenceTd"><p>Scheme hostname and port to direct the HTTP requests to in the form of http[s]://hostname:port. Can be configured at the endpoint component or in the correspoding REST configuration in the Camel Context. If you give this component a name (e.g. petstore) that REST configuration is consulted first rest-swagger next and global configuration last. If set overrides any value found in the Swagger specification RestConfiguration. Can be overriden in endpoint configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>produces</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>null</p></td><td colspan="1" rowspan="1" clas
 s="bare confluenceTd"><p>What payload type this component is producing. For example application/json according to the RFC7231. This equates to the value of Content-Type HTTP header. If set overrides any value present in the Swagger specification. Can be overriden in endpoint configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>specificationUri</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>"swagger.json"</p></td><td colspan="1" rowspan="1" class="bare confluenceTd"><p>Path to the Swagger specification file. The scheme host base path are taken from this specification but these can be overriden with properties on the component or endpoint level. If not given the component tries to load swagger.json resource. Can be overriden in endpoint configuration.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>operationId</strong></p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspa
 n="1" rowspan="1" class="bare confluenceTd"><p><strong>Endpoint only</strong>, the ID of the operation from the Swagger specification.</p></td></tr></tbody></table></div></div>
 
 
-<h3 id="RESTSwaggerComponent-Example:PetStore">Example: PetStore</h3><div class="paragraph"><p>Checkout the example in the <code>camel-example-rest-swagger</code> project in the <code>examples</code> directory.</p></div><div class="paragraph"><p>For example if you wanted to use the PetStore provided REST API simply reference the specification URI and desired operation id from the Swagger specification or download the specification and store it as <code>swagger.json</code> (in the root) of CLASSPATH that way it will be automaticaly used. Let&#8217;s use the <a shape="rect" href="undertow.html">Undertow</a> component to perform all the requests and Camels excelent support for <a shape="rect" href="spring-boot.html">Spring Boot</a>.</p></div><div class="paragraph"><p>Here are our dependencies defined in Maven POM file:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<h3 id="RESTSwaggerComponent-Example:PetStore">Example: PetStore</h3><div class="paragraph">Checkout the example in the <code>camel-example-rest-swagger</code> project in the <code>examples</code> directory.</div><div class="paragraph">For example if you wanted to use the PetStore provided REST API simply reference the specification URI and desired operation id from the Swagger specification or download the specification and store it as <code>swagger.json</code> (in the root) of CLASSPATH that way it will be automaticaly used. Let&#8217;s use the <a shape="rect" href="undertow.html">Undertow</a> component to perform all the requests and Camels excelent support for <a shape="rect" href="spring-boot.html">Spring Boot</a>.</div><div class="paragraph">Here are our dependencies defined in Maven POM file:<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[&lt;dependency&gt;
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-undertow-starter&lt;/artifactId&gt;
@@ -107,7 +107,7 @@
   &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
   &lt;artifactId&gt;camel-rest-swagger-starter&lt;/artifactId&gt;
 &lt;/dependency&gt;]]></script>
-</div></div><div class="paragraph">Start by defining the <em>Undertow</em> component and the <em>RestSwaggerComponent</em>:</div><div class="paragraph"><p>&#160;</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p class="paragraph">Start by defining the <em>Undertow</em> component and the <em>RestSwaggerComponent</em>:</p><div class="paragraph"><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[@Bean
 public Component petstore(CamelContext camelContext, UndertowComponent undertow) {
     RestSwaggerComponent petstore = new RestSwaggerComponent(camelContext);
@@ -116,7 +116,7 @@ public Component petstore(CamelContext c
 
     return petstore;
 }]]></script>
-</div></div><p><strong>NOTE:</strong> Support in Camel for Spring Boot will auto create the <code>UndertowComponent</code> Spring bean, and you can configure it using <code>application.properties</code> (or <code>application.yml</code>) using prefix <code>camel.component.undertow.</code>. We are defining the <code>petstore</code> component here in order to have a named component in the Camel context that we can use to interact with the PetStore REST API, if this is the only <code>rest-swagger</code> component used we might configure it in the same manner (using <code>application.properties</code>).</p><div class="paragraph"><p>Now in our application we can simply use the <code>ProducerTemplate</code> to invoke PetStore REST methods:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><strong>NOTE:</strong> Support in Camel for Spring Boot will auto create the <code>UndertowComponent</code> Spring bean, and you can configure it using <code>application.properties</code> (or <code>application.yml</code>) using prefix <code>camel.component.undertow.</code>. We are defining the <code>petstore</code> component here in order to have a named component in the Camel context that we can use to interact with the PetStore REST API, if this is the only <code>rest-swagger</code> component used we might configure it in the same manner (using <code>application.properties</code>).<div class="paragraph">Now in our application we can simply use the <code>ProducerTemplate</code> to invoke PetStore REST methods:<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[@Autowired
 ProducerTemplate template;
 


Loading...