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/30 11:42:21 UTC

[05/29] 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.

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/d44741ba
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d44741ba
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d44741ba

Branch: refs/heads/master
Commit: d44741bace5fc9d14a22a05e459b4515e62c8246
Parents: 1ee75b4
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Dec 26 10:44:35 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Dec 30 10:56:39 2014 +0100

----------------------------------------------------------------------
 .../tools/apt/ModelDocumentationAnnotationProcessor.java    | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d44741ba/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
index 215f8bd..8cd34fa 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/ModelDocumentationAnnotationProcessor.java
@@ -33,6 +33,7 @@ import javax.lang.model.util.ElementFilter;
 import javax.lang.model.util.Elements;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElementRef;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import static org.apache.camel.tools.apt.JsonSchemaHelper.sanitizeDescription;
@@ -40,7 +41,12 @@ import static org.apache.camel.tools.apt.Strings.canonicalClassName;
 import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
 
 // TODO: add support for @XmlElementRef (eg as used by choice)
+// TODO: add support for label so we can categorize the eips
+// TODO: add support for output to indicate what output the model support
 
+/**
+ * Process all camel-core's model classes (EIPs and DSL) and generate json schema documentation
+ */
 @SupportedAnnotationTypes({"javax.xml.bind.annotation.*"})
 @SupportedSourceVersion(SourceVersion.RELEASE_7)
 public class ModelDocumentationAnnotationProcessor extends AbstractAnnotationProcessor {
@@ -258,7 +264,7 @@ public class ModelDocumentationAnnotationProcessor extends AbstractAnnotationPro
                 }
             }
 
-            // check super classes which may also have @UriParam fields
+            // check super classes which may also have fields
             TypeElement baseTypeElement = null;
             TypeMirror superclass = classElement.getSuperclass();
             if (superclass != null) {
@@ -418,5 +424,4 @@ public class ModelDocumentationAnnotationProcessor extends AbstractAnnotationPro
         }
     }
 
-
 }
\ No newline at end of file