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:26 UTC
[10/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/ea702231
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ea702231
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ea702231
Branch: refs/heads/master
Commit: ea702231280a673c9d58efe962a7d306b72c4d9b
Parents: 97f13a4
Author: Claus Ibsen <da...@apache.org>
Authored: Fri Dec 26 12:34:24 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Dec 30 10:56:41 2014 +0100
----------------------------------------------------------------------
.../main/java/org/apache/camel/tools/apt/JsonSchemaHelper.java | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ea702231/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 048ee37..ae0178e 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
@@ -175,6 +175,10 @@ final class JsonSchemaHelper {
* @return the text that is valid as json
*/
public static String sanitizeDescription(String javadoc, boolean summary) {
+ if (Strings.isNullOrEmpty(javadoc)) {
+ return null;
+ }
+
// lets just use what java accepts as identifiers
StringBuilder sb = new StringBuilder();