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 2017/02/22 11:22:05 UTC
camel git commit: camel-connector - Fix a little issue in the maven
plugin
Repository: camel
Updated Branches:
refs/heads/master 8622f48b7 -> 130bec905
camel-connector - Fix a little issue in the maven plugin
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/130bec90
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/130bec90
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/130bec90
Branch: refs/heads/master
Commit: 130bec905f2ed9bb5ef81c4b1d1b2c48146f96fc
Parents: 8622f48
Author: Claus Ibsen <da...@apache.org>
Authored: Wed Feb 22 12:21:52 2017 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Wed Feb 22 12:21:52 2017 +0100
----------------------------------------------------------------------
.../org/apache/camel/maven/connector/ConnectorMojo.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/130bec90/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
----------------------------------------------------------------------
diff --git a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
index df192d9..960b630 100644
--- a/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
+++ b/connectors/camel-connector-maven-plugin/src/main/java/org/apache/camel/maven/connector/ConnectorMojo.java
@@ -321,7 +321,10 @@ public class ConnectorMojo extends AbstractJarMojo {
private String buildComponentHeaderSchema(List<Map<String, String>> rows, Map dto, String gitUrl) throws Exception {
String baseScheme = (String) dto.get("baseScheme");
String title = (String) dto.get("name");
- String scheme = StringHelper.camelCaseToDash(title);
+ String scheme = (String) dto.get("scheme");
+ if (scheme == null || scheme.isEmpty()) {
+ scheme = StringHelper.camelCaseToDash(title);
+ }
String baseSyntax = getOption(rows, "syntax");
String syntax = baseSyntax.replaceFirst(baseScheme, scheme);
@@ -354,7 +357,9 @@ public class ConnectorMojo extends AbstractJarMojo {
sb.append(" \"syntax\": \"" + syntax + "\",\n");
sb.append(" \"title\": \"" + title + "\",\n");
if (description != null) {
- sb.append(" \"description\": \"" + description + "\",\n");
+ // ensure description is sanitized
+ String text = JSonSchemaHelper.sanitizeDescription(description, false);
+ sb.append(" \"description\": \"" + text + "\",\n");
}
if (label != null) {
sb.append(" \"label\": \"" + label + "\",\n");