FAQ
CAMEL-10044: Add support for defining an option as secret.


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

Branch: refs/heads/master
Commit: 33cf208449808b81ad9a8da0eefe8367dded9b91
Parents: d6f4266
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Jun 11 14:54:53 2016 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Jun 11 14:54:53 2016 +0200

----------------------------------------------------------------------
  ...DataFormatComponentConfigurationAndDocumentationTest.java | 8 +++++---
  .../mock/MockComponentConfigurationAndDocumentationTest.java | 2 +-
  .../org/apache/camel/management/ManagedCamelContextTest.java | 6 +++---
  3 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/33cf2084/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
index a483dbb..c486ce0 100644
--- a/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/dataformat/DataFormatComponentConfigurationAndDocumentationTest.java
@@ -46,7 +46,7 @@ public class DataFormatComponentConfigurationAndDocumentationTest extends Contex
          assertNotNull(json);

          assertTrue(json.contains("\"name\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
- + " \"deprecated\": \"false\", \"description\": \"Name of data format\" }"));
+ + " \"deprecated\": \"false\", \"secret\": \"false\", \"description\": \"Name of data format\" }"));
          assertTrue(json.contains("\"operation\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\", \"type\": \"string\""));
          assertTrue(json.contains("\"synchronous\": { \"kind\": \"parameter\", \"group\": \"advanced\", \"label\": \"advanced\", \"type\": \"boolean\""));
      }
@@ -68,7 +68,7 @@ public class DataFormatComponentConfigurationAndDocumentationTest extends Contex

          // the default value is a bit tricky as its ", which is written escaped as \"
          assertTrue(json.contains("\"textQualifier\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\""
- + ", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\", \"defaultValue\": \"\\\"\""));
+ + ", \"javaType\": \"java.lang.String\", \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\"\""));

          List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
          assertEquals(9, rows.size());
@@ -87,6 +87,7 @@ public class DataFormatComponentConfigurationAndDocumentationTest extends Contex
          assertEquals("string", found.get("type"));
          assertEquals("java.lang.String", found.get("javaType"));
          assertEquals("false", found.get("deprecated"));
+ assertEquals("false", found.get("secret"));
          assertEquals("\"", found.get("defaultValue"));
          assertEquals("If the text is qualified with a char such as \"", found.get("description"));
      }
@@ -101,7 +102,7 @@ public class DataFormatComponentConfigurationAndDocumentationTest extends Contex

          // the default value is a bit tricky as its \, which is written escaped as \\
          assertTrue(json.contains("\"escapeChar\": { \"kind\": \"attribute\", \"required\": \"false\", \"type\": \"string\", \"javaType\": \"java.lang.String\","
- + " \"deprecated\": \"false\", \"defaultValue\": \"\\\\\", \"description\": \"The escape character.\""));
+ + " \"deprecated\": \"false\", \"secret\": \"false\", \"defaultValue\": \"\\\\\", \"description\": \"The escape character.\""));

          List<Map<String, String>> rows = JsonSchemaHelper.parseJsonSchema("properties", json, true);
          assertEquals(15, rows.size());
@@ -120,6 +121,7 @@ public class DataFormatComponentConfigurationAndDocumentationTest extends Contex
          assertEquals("string", found.get("type"));
          assertEquals("java.lang.String", found.get("javaType"));
          assertEquals("false", found.get("deprecated"));
+ assertEquals("false", found.get("secret"));
          assertEquals("\\", found.get("defaultValue"));
          assertEquals("The escape character.", found.get("description"));
      }

http://git-wip-us.apache.org/repos/asf/camel/blob/33cf2084/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
index e257dba..378f326 100644
--- a/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/mock/MockComponentConfigurationAndDocumentationTest.java
@@ -52,7 +52,7 @@ public class MockComponentConfigurationAndDocumentationTest extends ContextTestS
          assertNotNull(json);

          assertTrue(json.contains("\"retainFirst\": { \"kind\": \"parameter\", \"group\": \"producer\", \"label\": \"producer\", \"type\": \"integer\","
- + " \"javaType\": \"int\", \"deprecated\": \"false\", \"value\": \"10\""));
+ + " \"javaType\": \"int\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"10\""));
      }

      @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/33cf2084/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 1a658a6..d19aa6c 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
@@ -279,7 +279,7 @@ public class ManagedCamelContextTest extends ManagementTestSupport {

          assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
          assertTrue(json.contains("\"groupSize\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"integer\","
- + " \"javaType\": \"java.lang.Integer\", \"deprecated\": \"false\", \"value\": \"5\""));
+ + " \"javaType\": \"java.lang.Integer\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"5\""));

          // and we should also have the javadoc documentation
          assertTrue(json.contains("Set the initial delay for stats (in millis)"));
@@ -312,7 +312,7 @@ public class ManagedCamelContextTest extends ManagementTestSupport {

          assertTrue(json.contains("\"loggerName\": { \"kind\": \"path\", \"group\": \"producer\", \"required\": \"true\""));
          assertTrue(json.contains("\"groupSize\": { \"kind\": \"parameter\", \"group\": \"producer\", \"type\": \"integer\","
- + " \"javaType\": \"java.lang.Integer\", \"deprecated\": \"false\", \"value\": \"5\""));
+ + " \"javaType\": \"java.lang.Integer\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"5\""));
          // and we should also have the javadoc documentation
          assertTrue(json.contains("Set the initial delay for stats (in millis)"));
      }
@@ -392,7 +392,7 @@ public class ManagedCamelContextTest extends ManagementTestSupport {
          assertTrue(json.contains("\"label\": \"core,endpoint\""));
          assertTrue(json.contains("\"defaultQueueFactory\": { \"kind\": \"property\", \"type\": \"object\", \"javaType\":"
              + " \"org.apache.camel.component.seda.BlockingQueueFactory<org.apache.camel.Exchange>\","));
- assertTrue(json.contains("\"queueSize\": { \"kind\": \"property\", \"type\": \"integer\", \"javaType\": \"int\", \"deprecated\": \"false\", \"value\": \"0\""));
+ assertTrue(json.contains("\"queueSize\": { \"kind\": \"property\", \"type\": \"integer\", \"javaType\": \"int\", \"deprecated\": \"false\", \"secret\": \"false\", \"value\": \"0\""));
      }

      @Override

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 3 | next ›
Discussion Overview
groupcommits @
categoriescamel
postedJun 11, '16 at 2:27p
activeJun 11, '16 at 2:27p
posts3
users1
websitecamel.apache.org

1 user in discussion

Davsclaus: 3 posts

People

Translate

site design / logo © 2017 Grokbase