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/12/31 11:35:51 UTC

[1/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

Repository: camel
Updated Branches:
  refs/heads/master 92a351e34 -> f2fa80268


CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.


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

Branch: refs/heads/master
Commit: 1615993b7743218e69cc82fb56ffa99227635a9b
Parents: 92a351e
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Dec 31 10:03:26 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Dec 31 10:04:49 2014 +0100

----------------------------------------------------------------------
 .../camel/tools/apt/EipAnnotationProcessor.java | 62 ++++++++++++--------
 .../tools/apt/EndpointAnnotationProcessor.java  | 35 ++++++++---
 .../camel/tools/apt/JsonSchemaHelper.java       | 10 +++-
 3 files changed, 71 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1615993b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
index a4aa927..eb877c7 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
@@ -49,8 +49,6 @@ import static org.apache.camel.tools.apt.Strings.safeNull;
 
 // TODO: figure out a way to specify default value in the model classes which this APT can read
 
-// TODO: add support for @deprecated
-
 /**
  * Process all camel-core's model classes (EIPs and DSL) and generate json schema documentation
  */
@@ -173,7 +171,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             String doc = entry.getDocumentation();
             doc = sanitizeDescription(doc, false);
             buffer.append(JsonSchemaHelper.toJson(entry.getName(), entry.getKind(), entry.isRequired(), entry.getType(), entry.getDefaultValue(), doc,
-                    entry.isEnumType(), entry.getEnums(), entry.isOneOf(), entry.getOneOfTypes()));
+                    entry.isDeprecated(), entry.isEnumType(), entry.getEnums(), entry.isOneOf(), entry.getOneOfTypes()));
         }
         buffer.append("\n  }");
 
@@ -311,7 +309,9 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             }
         }
 
-        EipOption ep = new EipOption(name, "attribute", fieldTypeName, required, "", docComment, isEnum, enums, false, null);
+        boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != null;
+
+        EipOption ep = new EipOption(name, "attribute", fieldTypeName, required, "", docComment, deprecated, isEnum, enums, false, null);
         eipOptions.add(ep);
 
         return false;
@@ -372,7 +372,9 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
                 }
             }
 
-            EipOption ep = new EipOption(name, kind, fieldTypeName, required, "", docComment, isEnum, enums, isOneOf, oneOfTypes);
+            boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != null;
+
+            EipOption ep = new EipOption(name, kind, fieldTypeName, required, "", docComment, deprecated, isEnum, enums, isOneOf, oneOfTypes);
             eipOptions.add(ep);
         }
     }
@@ -401,7 +403,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
                 oneOfTypes.add(child);
             }
 
-            EipOption ep = new EipOption(name, kind, fieldTypeName, required, "", docComment, false, null, true, oneOfTypes);
+            EipOption ep = new EipOption(name, kind, fieldTypeName, required, "", docComment, false, false, null, true, oneOfTypes);
             eipOptions.add(ep);
         }
     }
@@ -413,52 +415,52 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
 
         // group
         String docComment = findJavaDoc(elementUtils, null, "group", classElement, true);
-        EipOption ep = new EipOption("group", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        EipOption ep = new EipOption("group", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // group
         docComment = findJavaDoc(elementUtils, null, "streamCache", classElement, true);
-        ep = new EipOption("streamCache", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("streamCache", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
         docComment = findJavaDoc(elementUtils, null, "trace", classElement, true);
-        ep = new EipOption("trace", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("trace", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
         docComment = findJavaDoc(elementUtils, null, "messageHistory", classElement, true);
-        ep = new EipOption("messageHistory", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("messageHistory", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
         docComment = findJavaDoc(elementUtils, null, "handleFault", classElement, true);
-        ep = new EipOption("handleFault", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("handleFault", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // delayer
         docComment = findJavaDoc(elementUtils, null, "delayer", classElement, true);
-        ep = new EipOption("delayer", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("delayer", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // autoStartup
         docComment = findJavaDoc(elementUtils, null, "autoStartup", classElement, true);
-        ep = new EipOption("autoStartup", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("autoStartup", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // startupOrder
         docComment = findJavaDoc(elementUtils, null, "startupOrder", classElement, true);
-        ep = new EipOption("startupOrder", "attribute", "java.lang.Integer", false, "", docComment, false, null, false, null);
+        ep = new EipOption("startupOrder", "attribute", "java.lang.Integer", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // errorHandlerRef
         docComment = findJavaDoc(elementUtils, null, "errorHandlerRef", classElement, true);
-        ep = new EipOption("errorHandlerRef", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("errorHandlerRef", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // routePolicyRef
         docComment = findJavaDoc(elementUtils, null, "routePolicyRef", classElement, true);
-        ep = new EipOption("routePolicyRef", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        ep = new EipOption("routePolicyRef", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // shutdownRoute
@@ -466,7 +468,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         enums.add("Default");
         enums.add("Defer");
         docComment = findJavaDoc(elementUtils, null, "shutdownRoute", classElement, true);
-        ep = new EipOption("shutdownRoute", "attribute", "org.apache.camel.ShutdownRoute", false, "", docComment, true, enums, false, null);
+        ep = new EipOption("shutdownRoute", "attribute", "org.apache.camel.ShutdownRoute", false, "", docComment, false, true, enums, false, null);
         eipOptions.add(ep);
 
         // shutdownRunningTask
@@ -474,14 +476,14 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         enums.add("CompleteCurrentTaskOnly");
         enums.add("CompleteAllTasks");
         docComment = findJavaDoc(elementUtils, null, "shutdownRunningTask", classElement, true);
-        ep = new EipOption("shutdownRunningTask", "attribute", "org.apache.camel.ShutdownRunningTask", false, "", docComment, true, enums, false, null);
+        ep = new EipOption("shutdownRunningTask", "attribute", "org.apache.camel.ShutdownRunningTask", false, "", docComment, false, true, enums, false, null);
         eipOptions.add(ep);
 
         // inputs
         Set<String> oneOfTypes = new TreeSet<String>();
         oneOfTypes.add("from");
         docComment = findJavaDoc(elementUtils, null, "inputs", classElement, true);
-        ep = new EipOption("inputs", "element", "java.util.List<org.apache.camel.model.FromDefinition>", true, "", docComment, false, null, true, oneOfTypes);
+        ep = new EipOption("inputs", "element", "java.util.List<org.apache.camel.model.FromDefinition>", true, "", docComment, false, false, null, true, oneOfTypes);
         eipOptions.add(ep);
 
         // outputs
@@ -506,7 +508,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         oneOfTypes.remove("route");
 
         docComment = findJavaDoc(elementUtils, null, "outputs", classElement, true);
-        ep = new EipOption("outputs", "element", "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", true, "", docComment, false, null, true, oneOfTypes);
+        ep = new EipOption("outputs", "element", "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", true, "", docComment, false, false, null, true, oneOfTypes);
         eipOptions.add(ep);
     }
 
@@ -520,19 +522,19 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
 
         // id
         String docComment = findJavaDoc(elementUtils, null, "id", classElement, true);
-        EipOption ep = new EipOption("id", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+        EipOption ep = new EipOption("id", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // description
         docComment = findJavaDoc(elementUtils, null, "description", classElement, true);
-        ep = new EipOption("description", "element", "org.apache.camel.model.DescriptionDefinition", false, "", docComment, false, null, false, null);
+        ep = new EipOption("description", "element", "org.apache.camel.model.DescriptionDefinition", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // lets skip custom id as it has no value for end users to configure
         if (!skipUnwanted) {
             // custom id
             docComment = findJavaDoc(elementUtils, null, "customId", classElement, true);
-            ep = new EipOption("customId", "attribute", "java.lang.String", false, "", docComment, false, null, false, null);
+            ep = new EipOption("customId", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
             eipOptions.add(ep);
         }
     }
@@ -569,7 +571,9 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
                 }
             }
 
-            EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", "", false, null, true, oneOfTypes);
+            boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != null;
+
+            EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", "", deprecated, false, null, true, oneOfTypes);
             eipOptions.add(ep);
         }
     }
@@ -609,7 +613,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             // remove some types which are not intended as an output in eips
             oneOfTypes.remove("route");
 
-            EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", "", false, null, true, oneOfTypes);
+            EipOption ep = new EipOption(name, kind, fieldTypeName, true, "", "", false, false, null, true, oneOfTypes);
             eipOptions.add(ep);
         }
     }
@@ -672,12 +676,13 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         private boolean required;
         private String defaultValue;
         private String documentation;
+        private boolean deprecated;
         private boolean enumType;
         private Set<String> enums;
         private boolean oneOf;
         private Set<String> oneOfTypes;
 
-        private EipOption(String name, String kind, String type, boolean required, String defaultValue, String documentation,
+        private EipOption(String name, String kind, String type, boolean required, String defaultValue, String documentation, boolean deprecated,
                           boolean enumType, Set<String> enums, boolean oneOf, Set<String> oneOfTypes) {
             this.name = name;
             this.kind = kind;
@@ -685,6 +690,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             this.required = required;
             this.defaultValue = defaultValue;
             this.documentation = documentation;
+            this.deprecated = deprecated;
             this.enumType = enumType;
             this.enums = enums;
             this.oneOf = oneOf;
@@ -715,6 +721,10 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             return documentation;
         }
 
+        public boolean isDeprecated() {
+            return deprecated;
+        }
+
         public boolean isEnumType() {
             return enumType;
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/1615993b/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 a091ab7..592a048 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
@@ -45,6 +45,8 @@ import static org.apache.camel.tools.apt.Strings.canonicalClassName;
 import static org.apache.camel.tools.apt.Strings.getOrElse;
 import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
 
+// TODO: add support for @Label
+
 /**
  * Processes all Camel {@link UriEndpoint}s and generate json schema and html documentation for the endpoint/component.
  */
@@ -190,7 +192,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
                 buffer.append(",");
             }
             buffer.append("\n    ");
-            buffer.append(JsonSchemaHelper.toJson(path.getName(), "path", null, path.getType(), "", path.getDocumentation(),
+            buffer.append(JsonSchemaHelper.toJson(path.getName(), "path", null, path.getType(), "", path.getDocumentation(), path.isDeprecated(),
                     path.isEnumType(), path.getEnums(), false, null));
         }
 
@@ -205,7 +207,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             // as its json we need to sanitize the docs
             String doc = entry.getDocumentationWithNotes();
             doc = sanitizeDescription(doc, false);
-            buffer.append(JsonSchemaHelper.toJson(entry.getName(), "parameter", null, entry.getType(), entry.getDefaultValue(), doc,
+            buffer.append(JsonSchemaHelper.toJson(entry.getName(), "parameter", null, entry.getType(), entry.getDefaultValue(), doc, entry.isDeprecated(),
                     entry.isEnumType(), entry.getEnums(), false, null));
         }
         buffer.append("\n  }");
@@ -233,6 +235,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             writer.println("    <th>Name</th>");
             writer.println("    <th>Kind</th>");
             writer.println("    <th>Type</th>");
+            writer.println("    <th>Deprecated</th>");
             writer.println("    <th>Default Value</th>");
             writer.println("    <th>Enum Values</th>");
             writer.println("    <th>Description</th>");
@@ -241,8 +244,9 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             for (EndpointPath path : endpointPaths) {
                 writer.println("  <tr>");
                 writer.println("    <td>" + path.getName() + "</td>");
-                writer.println("    <td>" + path.getType() + "</td>");
                 writer.println("    <td>" + "path" + "</td>");
+                writer.println("    <td>" + path.getType() + "</td>");
+                writer.println("    <td>" + path.isDeprecated() + "</td>");
                 writer.println("    <td>" + path.getEnumValuesAsHtml() + "</td>");
                 writer.println("    <td>" + path.getDocumentation() + "</td>");
                 writer.println("  </tr>");
@@ -251,8 +255,9 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             for (EndpointOption option : endpointOptions) {
                 writer.println("  <tr>");
                 writer.println("    <td>" + option.getName() + "</td>");
-                writer.println("    <td>" + option.getType() + "</td>");
                 writer.println("    <td>" + "parameter" + "</td>");
+                writer.println("    <td>" + option.getType() + "</td>");
+                writer.println("    <td>" + option.isDeprecated() + "</td>");
                 writer.println("    <td>" + option.getDefaultValue() + "</td>");
                 writer.println("    <td>" + option.getEnumValuesAsHtml() + "</td>");
                 writer.println("    <td>" + option.getDocumentationWithNotes() + "</td>");
@@ -326,6 +331,8 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             List<VariableElement> fieldElements = ElementFilter.fieldsIn(classElement.getEnclosedElements());
             for (VariableElement fieldElement : fieldElements) {
 
+                boolean deprecated = fieldElement.getAnnotation(Deprecated.class) != null;
+
                 UriPath path = fieldElement.getAnnotation(UriPath.class);
                 String fieldName = fieldElement.getSimpleName().toString();
                 if (path != null) {
@@ -358,7 +365,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
                         }
                     }
 
-                    EndpointPath ep = new EndpointPath(name, fieldTypeName, docComment, isEnum, enums);
+                    EndpointPath ep = new EndpointPath(name, fieldTypeName, docComment, deprecated, isEnum, enums);
                     endpointPaths.add(ep);
                 }
 
@@ -410,7 +417,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
                             }
                         }
 
-                        EndpointOption option = new EndpointOption(name, fieldTypeName, defaultValue, defaultValueNote,  docComment.trim(), isEnum, enums);
+                        EndpointOption option = new EndpointOption(name, fieldTypeName, defaultValue, defaultValueNote,  docComment.trim(), deprecated, isEnum, enums);
                         endpointOptions.add(option);
                     }
                 }
@@ -519,16 +526,18 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
         private String defaultValue;
         private String defaultValueNote;
         private String documentation;
+        private boolean deprecated;
         private boolean enumType;
         private Set<String> enums;
 
         private EndpointOption(String name, String type, String defaultValue, String defaultValueNote,
-                               String documentation, boolean enumType, Set<String> enums) {
+                               String documentation, boolean deprecated, boolean enumType, Set<String> enums) {
             this.name = name;
             this.type = type;
             this.defaultValue = defaultValue;
             this.defaultValueNote = defaultValueNote;
             this.documentation = documentation;
+            this.deprecated = deprecated;
             this.enumType = enumType;
             this.enums = enums;
         }
@@ -549,6 +558,10 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             return documentation;
         }
 
+        public boolean isDeprecated() {
+            return deprecated;
+        }
+
         public String getEnumValuesAsHtml() {
             CollectionStringBuffer csb = new CollectionStringBuffer("<br/>");
             if (enums != null && enums.size() > 0) {
@@ -607,14 +620,16 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
         private String name;
         private String type;
         private String documentation;
+        private boolean deprecated;
         private boolean enumType;
         private Set<String> enums;
 
-        private EndpointPath(String name, String type, String documentation,
+        private EndpointPath(String name, String type, String documentation, boolean deprecated,
                              boolean enumType, Set<String> enums) {
             this.name = name;
             this.type = type;
             this.documentation = documentation;
+            this.deprecated = deprecated;
             this.enumType = enumType;
             this.enums = enums;
         }
@@ -631,6 +646,10 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
             return documentation;
         }
 
+        public boolean isDeprecated() {
+            return deprecated;
+        }
+
         public String getEnumValuesAsHtml() {
             CollectionStringBuffer csb = new CollectionStringBuffer("<br/>");
             if (enums != null && enums.size() > 0) {

http://git-wip-us.apache.org/repos/asf/camel/blob/1615993b/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 ae0178e..303cf2d 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
@@ -31,15 +31,16 @@ final class JsonSchemaHelper {
     }
 
     public static String toJson(String name, String kind, Boolean required, String type, String defaultValue, String description,
-                                boolean enumType, Set<String> enums, boolean oneOfType, Set<String> oneOffTypes) {
+                                Boolean deprecated, boolean enumType, Set<String> enums, boolean oneOfType, Set<String> oneOffTypes) {
         String typeName = JsonSchemaHelper.getType(type, enumType);
 
         StringBuilder sb = new StringBuilder();
         sb.append(Strings.doubleQuote(name));
         sb.append(": { \"kind\": ");
         sb.append(Strings.doubleQuote(kind));
+
         if (required != null) {
-            sb.append(": \"required\": ");
+            sb.append(", \"required\": ");
             sb.append(Strings.doubleQuote(required.toString()));
         }
 
@@ -72,6 +73,11 @@ final class JsonSchemaHelper {
             sb.append(", \"javaType\": \"" + type + "\"");
         }
 
+        if (deprecated != null) {
+            sb.append(", \"deprecated\": ");
+            sb.append(Strings.doubleQuote(deprecated.toString()));
+        }
+
         if (!Strings.isNullOrEmpty(defaultValue)) {
             sb.append(", \"defaultValue\": ");
             sb.append(Strings.doubleQuote(defaultValue));


[3/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

Posted by da...@apache.org.
CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.


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

Branch: refs/heads/master
Commit: f2fa8026808948e594c57ab2124e12e06484b8f5
Parents: d42ba1f
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Dec 31 11:11:20 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Dec 31 11:35:41 2014 +0100

----------------------------------------------------------------------
 .../management/mbean/CamelOpenMBeanTypes.java   | 12 ++++----
 .../apache/camel/impl/DefaultCamelContext.java  | 30 ++++++++++++++------
 .../camel/management/mbean/ManagedEndpoint.java |  5 ++--
 .../management/mbean/ManagedProcessor.java      |  5 ++--
 .../management/ManagedCamelContextTest.java     |  6 ++--
 ...ponentConfigurationAndDocumentationTest.java |  2 +-
 .../camel/commands/EipExplainCommand.java       |  5 ++++
 .../camel/commands/EndpointExplainCommand.java  |  5 ++++
 8 files changed, 47 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
index df14e88..bfb346d 100644
--- a/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
+++ b/camel-core/src/main/java/org/apache/camel/api/management/mbean/CamelOpenMBeanTypes.java
@@ -72,9 +72,9 @@ public final class CamelOpenMBeanTypes {
     }
 
     public static CompositeType explainEndpointsCompositeType() throws OpenDataException {
-        return new CompositeType("endpoints", "Endpoints", new String[]{"option", "kind", "type", "java type", "value", "default value", "description"},
-                new String[]{"Option", "Kind", "Type", "Java Type", "Value", "Default Value", "Description"},
-                new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
+        return new CompositeType("endpoints", "Endpoints", new String[]{"option", "kind", "type", "java type", "deprecated", "value", "default value", "description"},
+                new String[]{"Option", "Kind", "Type", "Java Type", "Deprecated", "Value", "Default Value", "Description"},
+                new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
     }
 
     public static TabularType explainEipTabularType() throws OpenDataException {
@@ -83,9 +83,9 @@ public final class CamelOpenMBeanTypes {
     }
 
     public static CompositeType explainEipsCompositeType() throws OpenDataException {
-        return new CompositeType("eips", "EIPs", new String[]{"option", "kind", "type", "java type", "value", "default value", "description"},
-                new String[]{"Option", "Kind", "Type", "Java Type", "Value", "Default Value", "Description"},
-                new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
+        return new CompositeType("eips", "EIPs", new String[]{"option", "kind", "type", "java type", "deprecated", "value", "default value", "description"},
+                new String[]{"Option", "Kind", "Type", "Java Type", "Deprecated", "Value", "Default Value", "Description"},
+                new OpenType[]{SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING, SimpleType.STRING});
     }
 
     public static TabularType listComponentsTabularType() throws OpenDataException {

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
index 6a41243..f9c8bca 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
@@ -1241,6 +1241,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                     String defaultValue = row.get("defaultValue");
                     String type = row.get("type");
                     String javaType = row.get("javaType");
+                    String deprecated = row.get("javaType");
                     String description = row.get("description");
 
                     // find the configured option
@@ -1254,7 +1255,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                     if (includeAllOptions || o != null) {
                         // add as selected row
                         if (!selected.containsKey(name)) {
-                            selected.put(name, new String[]{name, kind, type, javaType, value, defaultValue, description});
+                            selected.put(name, new String[]{name, kind, type, javaType, deprecated, value, defaultValue, description});
                         }
                     }
                 }
@@ -1274,9 +1275,10 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                     String kind = row[1];
                     String type = row[2];
                     String javaType = row[3];
-                    String value = row[4];
-                    String defaultValue = row[5];
-                    String description = row[6];
+                    String deprecated = row[4];
+                    String value = row[5];
+                    String defaultValue = row[6];
+                    String description = row[7];
 
                     // add json of the option
                     buffer.append(doubleQuote(name)).append(": { ");
@@ -1290,6 +1292,9 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                     if (javaType != null) {
                         csb.append("\"javaType\": \"" + javaType + "\"");
                     }
+                    if (deprecated != null) {
+                        csb.append("\"deprecated\": \"" + deprecated + "\"");
+                    }
                     if (value != null) {
                         csb.append("\"value\": \"" + value + "\"");
                     }
@@ -1381,6 +1386,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 String type = null;
                 String kind = null;
                 String javaType = null;
+                String deprecated = null;
                 String defaultValue = null;
                 String description = null;
                 for (Map<String, String> row : rows) {
@@ -1388,6 +1394,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                         type = row.get("type");
                         kind = row.get("kind");
                         javaType = row.get("javaType");
+                        deprecated = row.get("deprecated");
                         defaultValue = row.get("defaultValue");
                         description = row.get("description");
                         break;
@@ -1395,7 +1402,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 }
 
                 // add as selected row
-                selected.put(name, new String[]{name, kind, type, javaType, value, defaultValue, description});
+                selected.put(name, new String[]{name, kind, type, javaType, deprecated, value, defaultValue, description});
             }
 
             // include other rows
@@ -1406,6 +1413,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 String defaultValue = row.get("defaultValue");
                 String type = row.get("type");
                 String javaType = row.get("javaType");
+                String deprecated = row.get("deprecated");
                 value = URISupport.sanitizePath(value);
                 String description = row.get("description");
 
@@ -1419,7 +1427,7 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 if (includeAllOptions || "path".equals(kind)) {
                     // add as selected row
                     if (!selected.containsKey(name)) {
-                        selected.put(name, new String[]{name, kind, type, javaType, value, defaultValue, description});
+                        selected.put(name, new String[]{name, kind, type, javaType, deprecated, value, defaultValue, description});
                     }
                 }
             }
@@ -1439,9 +1447,10 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 String kind = row[1];
                 String type = row[2];
                 String javaType = row[3];
-                String value = row[4];
-                String defaultValue = row[5];
-                String description = row[6];
+                String deprecated = row[4];
+                String value = row[5];
+                String defaultValue = row[6];
+                String description = row[7];
 
                 // add json of the option
                 buffer.append(doubleQuote(name)).append(": { ");
@@ -1455,6 +1464,9 @@ public class DefaultCamelContext extends ServiceSupport implements ModelCamelCon
                 if (javaType != null) {
                     csb.append("\"javaType\": \"" + javaType + "\"");
                 }
+                if (deprecated != null) {
+                    csb.append("\"deprecated\": \"" + deprecated + "\"");
+                }
                 if (value != null) {
                     csb.append("\"value\": \"" + value + "\"");
                 }

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
index 4871206..9ad6574 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
@@ -96,14 +96,15 @@ public class ManagedEndpoint implements ManagedInstance, ManagedEndpointMBean {
                 String kind = row.get("kind");
                 String type = row.get("type");
                 String javaType = row.get("javaType");
+                String deprecated = row.get("deprecated") != null ? row.get("deprecated") : "";
                 String value = row.get("value") != null ? row.get("value") : "";
                 String defaultValue = row.get("defaultValue") != null ? row.get("defaultValue") : "";
                 String description = row.get("description") != null ? row.get("description") : "";
 
                 CompositeType ct = CamelOpenMBeanTypes.explainEndpointsCompositeType();
                 CompositeData data = new CompositeDataSupport(ct,
-                        new String[]{"option", "kind", "type", "java type", "value", "default value", "description"},
-                        new Object[]{name, kind, type, javaType, value, defaultValue, description});
+                        new String[]{"option", "kind", "type", "java type", "deprecated", "value", "default value", "description"},
+                        new Object[]{name, kind, type, javaType, deprecated, value, defaultValue, description});
                 answer.put(data);
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
index f2d8804..f644c86 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedProcessor.java
@@ -149,14 +149,15 @@ public class ManagedProcessor extends ManagedPerformanceCounter implements Manag
                 String kind = row.get("kind");
                 String type = row.get("type");
                 String javaType = row.get("javaType");
+                String deprecated = row.get("deprecated") != null ? row.get("deprecated") : "";
                 String value = row.get("value") != null ? row.get("value") : "";
                 String defaultValue = row.get("defaultValue") != null ? row.get("defaultValue") : "";
                 String description = row.get("description") != null ? row.get("description") : "";
 
                 CompositeType ct = CamelOpenMBeanTypes.explainEipsCompositeType();
                 CompositeData data = new CompositeDataSupport(ct,
-                        new String[]{"option", "kind", "type", "java type", "value", "default value", "description"},
-                        new Object[]{name, kind, type, javaType, value, defaultValue, description});
+                        new String[]{"option", "kind", "type", "java type", "deprecated", "value", "default value", "description"},
+                        new Object[]{name, kind, type, javaType, deprecated, value, defaultValue, description});
                 answer.put(data);
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
index 9e7fb1b..57c444e 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
@@ -243,11 +243,11 @@ public class ManagedCamelContextTest extends ManagementTestSupport {
 
         assertEquals(5, StringHelper.countChar(json, '{'));
         assertEquals(5, StringHelper.countChar(json, '}'));
-        assertTrue(json.contains("\"groupDelay\": { \"kind\": \"parameter\", \"type\": \"integer\", \"javaType\": \"java.lang.Long\", \"value\": \"2000\","
+        assertTrue(json.contains("\"groupDelay\": { \"kind\": \"parameter\", \"type\": \"integer\", \"javaType\": \"java.lang.Long\", \"deprecated\": \"false\", \"value\": \"2000\","
                 + " \"description\": \"Set the initial delay for stats (in millis)\" },"));
-        assertTrue(json.contains("\"groupSize\": { \"kind\": \"parameter\", \"type\": \"integer\", \"javaType\": \"java.lang.Integer\", \"value\": \"5\","
+        assertTrue(json.contains("\"groupSize\": { \"kind\": \"parameter\", \"type\": \"integer\", \"javaType\": \"java.lang.Integer\", \"deprecated\": \"false\", \"value\": \"5\","
                 + " \"description\": \"An integer that specifies a group size for throughput logging.\" }"));
-        assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
+        assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\","
                 + " \"value\": \"foo\", \"description\": \"The logger name to use\" }"));
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcComponentConfigurationAndDocumentationTest.java b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcComponentConfigurationAndDocumentationTest.java
index 4be4197..ab7effb 100644
--- a/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcComponentConfigurationAndDocumentationTest.java
+++ b/components/camel-jdbc/src/test/java/org/apache/camel/component/jdbc/JdbcComponentConfigurationAndDocumentationTest.java
@@ -44,7 +44,7 @@ public class JdbcComponentConfigurationAndDocumentationTest extends CamelTestSup
 
         assertTrue(json.contains("\"outputClass\": { \"kind\": \"parameter\", \"type\": \"string\""));
         assertTrue(json.contains("\"allowNamedParameters\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
-        assertTrue(json.contains("\"beanRowMapper\": { \"kind\": \"parameter\", \"type\": \"object\", \"javaType\": \"org.apache.camel.component.jdbc.BeanRowMapper\" }"));
+        assertTrue(json.contains("\"beanRowMapper\": { \"kind\": \"parameter\", \"type\": \"object\", \"javaType\": \"org.apache.camel.component.jdbc.BeanRowMapper\", \"deprecated\": \"false\" },"));
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
index b94002c..fac0012 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EipExplainCommand.java
@@ -86,6 +86,11 @@ public class EipExplainCommand extends AbstractContextCommand {
                 out.print("Java Type:     ");
                 out.println(javaType);
             }
+            String deprecated = option.get("deprecated");
+            if (deprecated != null) {
+                out.print("Deprecated:    ");
+                out.println(deprecated);
+            }
             String value = option.get("value");
             if (value != null) {
                 out.print("Value:         ");

http://git-wip-us.apache.org/repos/asf/camel/blob/f2fa8026/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
----------------------------------------------------------------------
diff --git a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
index f1e4787..f61e845 100644
--- a/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
+++ b/platforms/commands/commands-core/src/main/java/org/apache/camel/commands/EndpointExplainCommand.java
@@ -116,6 +116,11 @@ public class EndpointExplainCommand extends AbstractContextCommand {
                     out.print("Java Type:     ");
                     out.println(javaType);
                 }
+                String deprecated = option.get("deprecated");
+                if (deprecated != null) {
+                    out.print("Deprecated:    ");
+                    out.println(deprecated);
+                }
                 String value = option.get("value");
                 if (value != null) {
                     out.print("Value:         ");


[2/3] camel git commit: CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.

Posted by da...@apache.org.
CAMEL-7999: apt compiler to generate json schema documentation for the model, whcih we later use to enrich the xml xsd to include documentation. Work in progress.


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

Branch: refs/heads/master
Commit: d42ba1f8984bc3fcba9f41e2f181157566d92f71
Parents: 1615993
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Dec 31 10:37:03 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Dec 31 10:37:03 2014 +0100

----------------------------------------------------------------------
 .../DirectComponentConfigurationAndDocumentationTest.java       | 2 +-
 .../timer/TimerComponentConfigurationAndDocumentationTest.java  | 3 ++-
 .../xslt/XsltComponentConfigurationAndDocumentationTest.java    | 2 +-
 .../test/java/org/apache/camel/impl/EipDocumentationTest.java   | 5 +++--
 .../org/apache/camel/management/ManagedCamelContextTest.java    | 2 +-
 5 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
index 60db3ec..b33c15a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/direct/DirectComponentConfigurationAndDocumentationTest.java
@@ -61,7 +61,7 @@ public class DirectComponentConfigurationAndDocumentationTest extends ContextTes
 
         // should include javadoc
         assertTrue("Should include javadoc", json.contains("\"timeout\": { \"kind\": \"parameter\", \"type\": \"integer\", \"javaType\": \"long\","
-                + " \"defaultValue\": \"30000\","
+                + " \"deprecated\": \"false\", \"defaultValue\": \"30000\","
                 + " \"description\": \"The timeout value to use if block is enabled. Is by default 30000.\""));
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/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 e64d517..4fffa87 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,7 +41,8 @@ public class TimerComponentConfigurationAndDocumentationTest extends ContextTest
         String json = compConf.createParameterJsonSchema();
         assertNotNull(json);
 
-        assertTrue(json.contains("\"timerName\": { \"kind\": \"path\", \"type\": \"string\", \"javaType\": \"java.lang.String\", \"description\": \"The name of the timer\" }"));
+        assertTrue(json.contains("\"timerName\": { \"kind\": \"path\", \"type\": \"string\", \"javaType\": \"java.lang.String\""
+                + ", \"deprecated\": \"false\", \"description\": \"The name of the timer\" }"));
         assertTrue(json.contains("\"delay\": { \"kind\": \"parameter\", \"type\": \"integer\""));
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/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 794d16a..ac069c4 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\": { \"kind\": \"parameter\", \"type\": \"boolean\", \"javaType\": \"boolean\", \"defaultValue\": \"true\" }"));
+        assertTrue(json.contains("\"contentCache\": { \"kind\": \"parameter\", \"type\": \"boolean\", \"javaType\": \"boolean\", \"deprecated\": \"false\", \"defaultValue\": \"true\" }"));
         assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"type\": \"boolean\""));
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
index 01e5dab..5ed12dc 100644
--- a/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/impl/EipDocumentationTest.java
@@ -47,7 +47,7 @@ public class EipDocumentationTest extends ContextTestSupport {
         // there should be javadoc included
         assertTrue(json.contains("Whether to aggregate using a sequential single thread or allow parallel aggregation"));
         // and it support outputs
-        assertTrue(json.contains("\"outputs\": { \"kind\": \"element\": \"required\": \"true\", \"type\": \"array\","));
+        assertTrue(json.contains("\"outputs\": { \"kind\": \"element\", \"required\": \"true\", \"type\": \"array\", \"javaType\""));
     }
 
     public void testSimpleDocumentation() throws Exception {
@@ -67,7 +67,8 @@ public class EipDocumentationTest extends ContextTestSupport {
         assertNotNull("Should have found json for failover", json);
 
         assertTrue(json.contains("\"name\": \"failover\""));
-        assertTrue(json.contains("\"exception\": { \"kind\": \"element\": \"required\": \"false\", \"type\": \"array\", \"javaType\": \"java.util.List<java.lang.String>\""));
+        assertTrue(json.contains("\"exception\": { \"kind\": \"element\", \"required\": \"false\", \"type\": \"array\""
+                + ", \"javaType\": \"java.util.List<java.lang.String>\", \"deprecated\": \"false\""));
     }
 
     public void testNotFound() throws Exception {

http://git-wip-us.apache.org/repos/asf/camel/blob/d42ba1f8/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
index 4867ecc..9e7fb1b 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextTest.java
@@ -265,7 +265,7 @@ public class ManagedCamelContextTest extends ManagementTestSupport {
         assertNotNull(json);
 
         assertTrue(json.contains("\"label\": \"transformation\""));
-        assertTrue(json.contains("\"expression\": { \"kind\": \"element\": \"required\": \"true\""));
+        assertTrue(json.contains("\"expression\": { \"kind\": \"element\", \"required\": \"true\", \"type\": \"object\""));
     }
 
     @Override