You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/11/12 12:47:26 UTC

[1/4] camel git commit: CAMEL-7999: Component json schema should favor the built time generated that is richer.

Repository: camel
Updated Branches:
  refs/heads/master 7761061fa -> 25cfae1f3


CAMEL-7999: Component json schema should favor the built time generated that is richer.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dac574d0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dac574d0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dac574d0

Branch: refs/heads/master
Commit: dac574d0b7fec2ffd2712dea4c8da773a66c7bf2
Parents: 7761061
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 12 10:39:35 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 12 12:07:25 2014 +0100

----------------------------------------------------------------------
 .../camel/impl/ComponentConfigurationSupport.java       | 12 ++++++++++++
 ...TimerComponentConfigurationAndDocumentationTest.java |  1 +
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dac574d0/camel-core/src/main/java/org/apache/camel/impl/ComponentConfigurationSupport.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/ComponentConfigurationSupport.java b/camel-core/src/main/java/org/apache/camel/impl/ComponentConfigurationSupport.java
index 40f190c..8e34e42 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/ComponentConfigurationSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/ComponentConfigurationSupport.java
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.impl;
 
+import java.io.IOException;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -165,6 +166,17 @@ public abstract class ComponentConfigurationSupport implements ComponentConfigur
     }
 
     public String createParameterJsonSchema() {
+        // favor loading the json schema from the built-time generated file
+        String defaultName = component.getCamelContext().resolveComponentDefaultName(component.getClass().getName());
+        if (defaultName != null) {
+            try {
+                return component.getCamelContext().getComponentParameterJsonSchema(defaultName);
+            } catch (IOException e) {
+                // ignore as we fallback to create the json at runtime
+            }
+        }
+
+        // fallback to resolving at runtime
         SortedMap<String, ParameterConfiguration> map = getParameterConfigurationMap();
         StringBuilder buffer = new StringBuilder("{\n  \"properties\": {");
         boolean first = true;

http://git-wip-us.apache.org/repos/asf/camel/blob/dac574d0/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
index b6cdcaa..0769411 100644
--- a/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/timer/TimerComponentConfigurationAndDocumentationTest.java
@@ -41,6 +41,7 @@ public class TimerComponentConfigurationAndDocumentationTest extends ContextTest
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
+        assertTrue(json.contains("\"timerName\": { \"type\": \"string\", \"javaType\": \"java.lang.String\", \"description\": \"The name of the timer\" }"));
         assertTrue(json.contains("\"delay\": { \"type\": \"integer\""));
     }
 


[3/4] camel git commit: CAMEL-7999: apt plugin compiler should included options from parent component, if extending.

Posted by da...@apache.org.
CAMEL-7999: apt plugin compiler should included options from parent component, if extending.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/25cfae1f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/25cfae1f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/25cfae1f

Branch: refs/heads/master
Commit: 25cfae1f397f5fa63dd75a3c98116940941a81ab
Parents: c77199a
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 12 12:07:07 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 12 12:07:26 2014 +0100

----------------------------------------------------------------------
 .../tools/apt/EndpointAnnotationProcessor.java  | 39 ++++++++++++++++++--
 .../camel/tools/apt/JsonSchemaHelper.java       |  5 ++-
 2 files changed, 39 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/25cfae1f/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index b14722c..222e913 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -38,6 +38,7 @@ import javax.lang.model.SourceVersion;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.element.VariableElement;
 import javax.lang.model.type.MirroredTypeException;
@@ -157,7 +158,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         // get endpoint information which is divided into paths and options (though there should really only be one path)
         Set<EndpointPath> endpointPaths = new LinkedHashSet<>();
         Set<EndpointOption> endpointOptions = new LinkedHashSet<>();
-        findClassProperties(roundEnv, endpointPaths, endpointOptions, classElement, "");
+        findClassProperties(writer, roundEnv, endpointPaths, endpointOptions, classElement, "");
 
         String json = createParameterJsonSchema(componentModel, endpointPaths, endpointOptions);
         writer.println(json);
@@ -225,7 +226,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
 
         Set<EndpointPath> endpointPaths = new LinkedHashSet<>();
         Set<EndpointOption> endpointOptions = new LinkedHashSet<>();
-        findClassProperties(roundEnv, endpointPaths, endpointOptions, classElement, prefix);
+        findClassProperties(writer, roundEnv, endpointPaths, endpointOptions, classElement, prefix);
         if (!endpointOptions.isEmpty() || !endpointPaths.isEmpty()) {
             writer.println("<table class='table'>");
             writer.println("  <tr>");
@@ -314,7 +315,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         return model;
     }
 
-    protected void findClassProperties(RoundEnvironment roundEnv, Set<EndpointPath> endpointPaths, Set<EndpointOption> endpointOptions, TypeElement classElement, String prefix) {
+    protected void findClassProperties(PrintWriter writer, RoundEnvironment roundEnv, Set<EndpointPath> endpointPaths, Set<EndpointOption> endpointOptions, TypeElement classElement, String prefix) {
         Elements elementUtils = processingEnv.getElementUtils();
         while (true) {
             List<VariableElement> fieldElements = ElementFilter.fieldsIn(classElement.getEnclosedElements());
@@ -384,7 +385,7 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
                         if (!isNullOrEmpty(extraPrefix)) {
                             nestedPrefix += extraPrefix;
                         }
-                        findClassProperties(roundEnv, endpointPaths, endpointOptions, fieldTypeElement, nestedPrefix);
+                        findClassProperties(writer, roundEnv, endpointPaths, endpointOptions, fieldTypeElement, nestedPrefix);
                     } else {
                         String docComment = elementUtils.getDocComment(fieldElement);
                         if (isNullOrEmpty(docComment)) {
@@ -435,7 +436,21 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
             TypeMirror superclass = classElement.getSuperclass();
             if (superclass != null) {
                 String superClassName = canonicalClassName(superclass.toString());
+                // check the rounding env first
                 baseTypeElement = findTypeElement(roundEnv, superClassName);
+                if (baseTypeElement == null) {
+                    // okay not found in rounding env, that means this component extends another component from another JAR
+                    // so we need to find it using the package name instead of in the rounding environment
+                    int idx = superClassName.lastIndexOf('.');
+                    String name = superClassName.substring(0, idx);
+                    // skip java.lang package
+                    if (!"java.lang".equals(name)) {
+                        PackageElement pe = elementUtils.getPackageElement(name);
+                        if (pe != null) {
+                            baseTypeElement = findTypeElement(pe, superClassName);
+                        }
+                    }
+                }
             }
             if (baseTypeElement != null) {
                 classElement = baseTypeElement;
@@ -461,6 +476,22 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
         return null;
     }
 
+    protected TypeElement findTypeElement(PackageElement element, String className) {
+        if (!isNullOrEmpty(className) && !"java.lang.Object".equals(className)) {
+            List<? extends Element> rootElements = element.getEnclosedElements();
+            for (Element rootElement : rootElements) {
+                if (rootElement instanceof TypeElement) {
+                    TypeElement typeElement = (TypeElement) rootElement;
+                    String aRootName = canonicalClassName(typeElement.getQualifiedName().toString());
+                    if (className.equals(aRootName)) {
+                        return typeElement;
+                    }
+                }
+            }
+        }
+        return null;
+    }
+
     /**
      * Helper method to produce class output text file using the given handler
      */

http://git-wip-us.apache.org/repos/asf/camel/blob/25cfae1f/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
index 108c58a..96d029e 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
@@ -79,7 +79,10 @@ final class JsonSchemaHelper {
     public static String getType(String type, boolean enumType) {
         if (enumType) {
             return "enum";
-        } if (type.equals(URI.class.getName()) || type.equals(URL.class.getName())) {
+        } else if (type == null) {
+            // return generic type for unknown type
+            return "object";
+        } else if (type.equals(URI.class.getName()) || type.equals(URL.class.getName())) {
             return "sting";
         }
 


[2/4] camel git commit: CAMEL-8034: xslt component like the others.

Posted by da...@apache.org.
CAMEL-8034: xslt component like the others.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b3f210fd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b3f210fd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b3f210fd

Branch: refs/heads/master
Commit: b3f210fdf43aff44bb086b1e5fbcb87a7a850667
Parents: dac574d
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 12 10:56:21 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 12 12:07:26 2014 +0100

----------------------------------------------------------------------
 .../xslt/XsltComponentConfigurationAndDocumentationTest.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b3f210fd/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
index aaaf8e2..ba6cfb0 100644
--- a/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/xslt/XsltComponentConfigurationAndDocumentationTest.java
@@ -41,7 +41,7 @@ public class XsltComponentConfigurationAndDocumentationTest extends ContextTestS
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
-        assertTrue(json.contains("\"contentCache\": { \"type\": \"boolean\", \"javaType\": \"boolean\" }"));
+        assertTrue(json.contains("\"contentCache\": { \"type\": \"boolean\", \"javaType\": \"boolean\", \"defaultValue\": \"true\" }"));
         assertTrue(json.contains("\"synchronous\": { \"type\": \"boolean\""));
     }
 


[4/4] camel git commit: CAMEL-8038: Component endpoint options should provide @UriPath. Also components extending others should be separate classes as minimum

Posted by da...@apache.org.
CAMEL-8038: Component endpoint options should provide @UriPath. Also components extending others should be separate classes as minimum


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/c77199a5
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c77199a5
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c77199a5

Branch: refs/heads/master
Commit: c77199a5b11235b6cd1a74226f5a0078743e249b
Parents: b3f210f
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Nov 12 11:32:53 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Nov 12 12:07:26 2014 +0100

----------------------------------------------------------------------
 .../org/apache/camel/util/JsonSchemaHelper.java |  4 ++
 .../atmosphere/websocket/WebsocketEndpoint.java | 24 ++++-----
 .../src/test/resources/log4j.properties         |  2 +-
 .../camel/component/http/HttpComponent.java     | 11 ++--
 .../camel/component/http/HttpEndpoint.java      | 16 ++++--
 .../camel/component/http/HttpsComponent.java    | 39 ++++++++++++++
 .../camel/component/http/HttpsEndpoint.java     | 57 ++++++++++++++++++++
 .../services/org/apache/camel/component/https   |  2 +-
 .../component/servlet/ServletEndpoint.java      |  3 ++
 .../tools/apt/EndpointAnnotationProcessor.java  |  5 +-
 .../camel/tools/apt/JsonSchemaHelper.java       |  4 ++
 11 files changed, 141 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java b/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
index e580ec7..76f27be 100644
--- a/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
+++ b/camel-core/src/main/java/org/apache/camel/util/JsonSchemaHelper.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.util;
 
+import java.net.URI;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
@@ -44,6 +46,8 @@ public final class JsonSchemaHelper {
             return "enum";
         } else if (type.isArray()) {
             return "array";
+        } if (type.isAssignableFrom(URI.class) || type.isAssignableFrom(URL.class)) {
+            return "sting";
         }
 
         String primitive = getPrimitiveType(type);

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java b/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
index 5183019..7d16e31 100644
--- a/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
+++ b/components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketEndpoint.java
@@ -26,6 +26,7 @@ import org.apache.camel.component.http.HttpClientConfigurer;
 import org.apache.camel.component.servlet.ServletEndpoint;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.commons.httpclient.HttpConnectionManager;
 import org.apache.commons.httpclient.params.HttpClientParams;
 
@@ -34,10 +35,13 @@ import org.apache.commons.httpclient.params.HttpClientParams;
  */
 @UriEndpoint(scheme = "atmosphere-websocket", consumerClass = WebsocketConsumer.class)
 public class WebsocketEndpoint extends ServletEndpoint {
+
+    @UriPath
+    private String servicePath;
     private WebSocketStore store;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean sendToAll;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean useStreaming;
     
     public WebsocketEndpoint(String endPointURI, WebsocketComponent component, URI httpUri, HttpClientParams params, HttpConnectionManager httpConnectionManager,
@@ -47,35 +51,26 @@ public class WebsocketEndpoint extends ServletEndpoint {
         //TODO find a better way of assigning the store
         int idx = endPointURI.indexOf('?');
         String name = idx > -1 ? endPointURI.substring(0, idx) : endPointURI;
-        this.store = component.getWebSocketStore(name);
+
+        this.servicePath = name;
+        this.store = component.getWebSocketStore(servicePath);
     }
     
-
-    /* (non-Javadoc)
-     * @see org.apache.camel.Endpoint#createProducer()
-     */
     @Override
     public Producer createProducer() throws Exception {
         return new WebsocketProducer(this);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.Endpoint#createConsumer(org.apache.camel.Processor)
-     */
     @Override
     public Consumer createConsumer(Processor processor) throws Exception {
         return new WebsocketConsumer(this, processor);
     }
 
-    /* (non-Javadoc)
-     * @see org.apache.camel.IsSingleton#isSingleton()
-     */
     @Override
     public boolean isSingleton() {
         return true;
     }
 
-
     /**
      * @return the sendToAll
      */
@@ -104,7 +99,6 @@ public class WebsocketEndpoint extends ServletEndpoint {
         this.useStreaming = useStreaming;
     }
 
-
     WebSocketStore getWebSocketStore() {
         return store;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-atmosphere-websocket/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/components/camel-atmosphere-websocket/src/test/resources/log4j.properties b/components/camel-atmosphere-websocket/src/test/resources/log4j.properties
index 0c38599..bb1dc33 100644
--- a/components/camel-atmosphere-websocket/src/test/resources/log4j.properties
+++ b/components/camel-atmosphere-websocket/src/test/resources/log4j.properties
@@ -36,4 +36,4 @@ log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%
 log4j.appender.file=org.apache.log4j.FileAppender
 log4j.appender.file.layout=org.apache.log4j.PatternLayout
 log4j.appender.file.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
-log4j.appender.file.file=target/camel-websocket2-test.log
+log4j.appender.file.file=target/camel-atmosphere-websocket-test.log

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
index 717c505..9256c9b 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpComponent.java
@@ -17,6 +17,7 @@
 package org.apache.camel.component.http;
 
 import java.net.URI;
+import java.net.URISyntaxException;
 import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.Map;
@@ -37,8 +38,7 @@ import org.apache.commons.httpclient.params.HttpClientParams;
 import org.apache.commons.httpclient.params.HttpConnectionManagerParams;
 
 /**
- * Defines the <a href="http://camel.apache.org/http.html">HTTP
- * Component</a>
+ * The <a href="http://camel.apache.org/http.html">HTTP Component</a>
  *
  * @version 
  */
@@ -248,7 +248,7 @@ public class HttpComponent extends HeaderFilterStrategyComponent {
         URI endpointUri = URISupport.createRemainingURI(new URI(addressUri), httpClientParameters);
        
         // create the endpoint and connectionManagerParams already be set
-        HttpEndpoint endpoint = new HttpEndpoint(endpointUri.toString(), this, clientParams, thisHttpConnectionManager, configurer);
+        HttpEndpoint endpoint = createHttpEndpoint(endpointUri.toString(), this, clientParams, thisHttpConnectionManager, configurer);
         
         if (headerFilterStrategy != null) {
             endpoint.setHeaderFilterStrategy(headerFilterStrategy);
@@ -305,6 +305,11 @@ public class HttpComponent extends HeaderFilterStrategyComponent {
         endpoint.setHttpUri(httpUri);
         return endpoint;
     }
+
+    protected HttpEndpoint createHttpEndpoint(String uri, HttpComponent component, HttpClientParams clientParams,
+                                              HttpConnectionManager connectionManager, HttpClientConfigurer configurer) throws URISyntaxException {
+        return new HttpEndpoint(uri, component, clientParams, connectionManager, configurer);
+    }
     
     @Override
     protected boolean useIntrospectionOnEndpoint() {

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
index 4fcef55..5971cbc 100644
--- a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpEndpoint.java
@@ -29,6 +29,7 @@ import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategyAware;
 import org.apache.camel.spi.UriEndpoint;
 import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriPath;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.commons.httpclient.HttpClient;
 import org.apache.commons.httpclient.HttpConnectionManager;
@@ -49,18 +50,20 @@ public class HttpEndpoint extends DefaultPollingEndpoint implements HeaderFilter
     private HeaderFilterStrategy headerFilterStrategy = new HttpHeaderFilterStrategy();
     private HttpBinding binding;
     private HttpComponent component;
+    @UriPath
     private URI httpUri;
     private HttpClientParams clientParams;
     private HttpClientConfigurer httpClientConfigurer;
     private HttpConnectionManager httpConnectionManager;
+    @UriParam(defaultValue = "true")
     private boolean throwExceptionOnFailure = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean bridgeEndpoint;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean matchOnUriPrefix;
-    @UriParam
+    @UriParam(defaultValue = "true")
     private boolean chunked = true;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean disableStreamCache;
     @UriParam
     private String proxyHost;
@@ -70,7 +73,7 @@ public class HttpEndpoint extends DefaultPollingEndpoint implements HeaderFilter
     private String authMethodPriority;
     @UriParam
     private boolean transferException;
-    @UriParam
+    @UriParam(defaultValue = "false")
     private boolean traceEnabled;
     @UriParam
     private String httpMethodRestrict;
@@ -249,6 +252,9 @@ public class HttpEndpoint extends DefaultPollingEndpoint implements HeaderFilter
         return httpUri;
     }
 
+    /**
+     * The url of the HTTP endpoint to call.
+     */
     public void setHttpUri(URI httpUri) {
         this.httpUri = httpUri;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsComponent.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsComponent.java
new file mode 100644
index 0000000..3e83e52
--- /dev/null
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsComponent.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http;
+
+import java.net.URISyntaxException;
+
+import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.commons.httpclient.params.HttpClientParams;
+
+/**
+ * The <a href="http://camel.apache.org/http.html">HTTPS Component</a>
+ */
+public class HttpsComponent extends HttpComponent {
+
+    public HttpsComponent() {
+        super(HttpsEndpoint.class);
+    }
+
+    @Override
+    protected HttpEndpoint createHttpEndpoint(String uri, HttpComponent component, HttpClientParams clientParams,
+                                              HttpConnectionManager connectionManager, HttpClientConfigurer configurer) throws URISyntaxException {
+        return new HttpsEndpoint(uri, component, clientParams, connectionManager, configurer);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsEndpoint.java b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsEndpoint.java
new file mode 100644
index 0000000..2ebb3a5
--- /dev/null
+++ b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpsEndpoint.java
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.http;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.commons.httpclient.HttpConnectionManager;
+import org.apache.commons.httpclient.params.HttpClientParams;
+
+@UriEndpoint(scheme = "https", consumerClass = HttpConsumer.class)
+public class HttpsEndpoint extends HttpEndpoint {
+
+    public HttpsEndpoint() {
+    }
+
+    public HttpsEndpoint(String endPointURI, HttpComponent component, URI httpURI) throws URISyntaxException {
+        super(endPointURI, component, httpURI);
+    }
+
+    public HttpsEndpoint(String endPointURI, HttpComponent component, URI httpURI, HttpConnectionManager httpConnectionManager) throws URISyntaxException {
+        super(endPointURI, component, httpURI, httpConnectionManager);
+    }
+
+    public HttpsEndpoint(String uri, HttpComponent component, HttpClientParams clientParams,
+                         HttpConnectionManager connectionManager, HttpClientConfigurer configurer) throws URISyntaxException {
+        super(uri, component, clientParams, connectionManager, configurer);
+    }
+
+    public HttpsEndpoint(String endPointURI, HttpComponent component, URI httpURI, HttpClientParams clientParams,
+                         HttpConnectionManager httpConnectionManager, HttpClientConfigurer clientConfigurer) throws URISyntaxException {
+        super(endPointURI, component, httpURI, clientParams, httpConnectionManager, clientConfigurer);
+    }
+
+    /**
+     * The url of the HTTPS endpoint to call.
+     */
+    @Override
+    public void setHttpUri(URI httpUri) {
+        super.setHttpUri(httpUri);
+    }
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-http/src/main/resources/META-INF/services/org/apache/camel/component/https
----------------------------------------------------------------------
diff --git a/components/camel-http/src/main/resources/META-INF/services/org/apache/camel/component/https b/components/camel-http/src/main/resources/META-INF/services/org/apache/camel/component/https
index 4efb7cf..af1bb0c 100644
--- a/components/camel-http/src/main/resources/META-INF/services/org/apache/camel/component/https
+++ b/components/camel-http/src/main/resources/META-INF/services/org/apache/camel/component/https
@@ -15,4 +15,4 @@
 # limitations under the License.
 #
 
-class=org.apache.camel.component.http.HttpComponent
+class=org.apache.camel.component.http.HttpsComponent

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
index 84af20d..abb50e2 100644
--- a/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
+++ b/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/ServletEndpoint.java
@@ -43,6 +43,9 @@ public class ServletEndpoint extends HttpEndpoint {
         super(endPointURI, component, httpUri, params, httpConnectionManager, clientConfigurer);
     }
 
+    /**
+     * Name of the servlet to use
+     */
     public void setServletName(String name) {
         servletName = name;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 908905d..b14722c 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -203,7 +203,10 @@ public class EndpointAnnotationProcessor extends AbstractProcessor {
                 buffer.append(",");
             }
             buffer.append("\n    ");
-            buffer.append(JsonSchemaHelper.toJson(entry.getName(), entry.getType(), entry.getDefaultValue(), entry.getDocumentationWithNotes(), entry.isEnumType(), entry.getEnums()));
+            // as its json we need to sanitize the docs
+            String doc = entry.getDocumentationWithNotes();
+            doc = sanitizeDescription(doc, false);
+            buffer.append(JsonSchemaHelper.toJson(entry.getName(), entry.getType(), entry.getDefaultValue(), doc, entry.isEnumType(), entry.getEnums()));
         }
         buffer.append("\n  }");
 

http://git-wip-us.apache.org/repos/asf/camel/blob/c77199a5/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
index ad1ca8f..108c58a 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.tools.apt;
 
+import java.net.URI;
+import java.net.URL;
 import java.util.Set;
 
 /**
@@ -77,6 +79,8 @@ final class JsonSchemaHelper {
     public static String getType(String type, boolean enumType) {
         if (enumType) {
             return "enum";
+        } if (type.equals(URI.class.getName()) || type.equals(URL.class.getName())) {
+            return "sting";
         }
 
         String primitive = getPrimitiveType(type);