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 2016/12/08 16:14:49 UTC

[4/4] camel git commit: Fixed invalid component json schema discovered by mvn camel:validate

Fixed invalid component json schema discovered by mvn camel:validate


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

Branch: refs/heads/camel-2.18.x
Commit: acca238c7724067201195dc811d66e15db7946aa
Parents: 7a68f34
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Dec 8 17:13:44 2016 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Dec 8 17:14:25 2016 +0100

----------------------------------------------------------------------
 .../camel-servicenow/src/main/docs/servicenow-component.adoc  | 7 ++++---
 .../camel/component/servicenow/ServiceNowConfiguration.java   | 7 ++++---
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/acca238c/components/camel-servicenow/src/main/docs/servicenow-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/docs/servicenow-component.adoc b/components/camel-servicenow/src/main/docs/servicenow-component.adoc
index f87d24e6..b91b456 100644
--- a/components/camel-servicenow/src/main/docs/servicenow-component.adoc
+++ b/components/camel-servicenow/src/main/docs/servicenow-component.adoc
@@ -57,7 +57,7 @@ The ServiceNow component supports 7 options which are listed below.
 
 
 // endpoint options: START
-The ServiceNow component supports 33 endpoint options which are listed below:
+The ServiceNow component supports 34 endpoint options which are listed below:
 
 {% raw %}
 [width="100%",cols="2,1,1m,1m,5",options="header"]
@@ -75,6 +75,7 @@ The ServiceNow component supports 33 endpoint options which are listed below:
 | includeScores | producer |  | Boolean | Set this parameter to true to return all scores for a scorecard. If a value is not specified this parameter defaults to false and returns only the most recent score value.
 | inputDisplayValue | producer |  | Boolean | True to set raw value of input fields (default: false)
 | key | producer |  | Boolean | Set this parameter to true to return only scorecards for key indicators.
+| models | producer |  | String | Defines both request and response models
 | perPage | producer | 10 | Integer | Enter the maximum number of scorecards each query can return. By default this value is 10 and the maximum is 100.
 | release | producer | HELSINKI | ServiceNowRelease | The ServiceNow release to target default to Helsinki See https://docs.servicenow.com
 | requestModels | producer |  | String | Defines the request model
@@ -94,8 +95,8 @@ The ServiceNow component supports 33 endpoint options which are listed below:
 | oauthClientId | security |  | String | OAuth2 ClientID
 | oauthClientSecret | security |  | String | OAuth2 ClientSecret
 | oauthTokenUrl | security |  | String | OAuth token Url
-| password | security |  | String | *Required* ServiceNow account password MUST be provided
-| userName | security |  | String | *Required* ServiceNow user account name MUST be provided
+| password | security |  | String | ServiceNow account password MUST be provided
+| userName | security |  | String | ServiceNow user account name MUST be provided
 |=======================================================================
 {% endraw %}
 // endpoint options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/acca238c/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
----------------------------------------------------------------------
diff --git a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
index 8f242e1..422c0ff 100644
--- a/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
+++ b/components/camel-servicenow/src/main/java/org/apache/camel/component/servicenow/ServiceNowConfiguration.java
@@ -23,7 +23,6 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 import com.fasterxml.jackson.databind.DeserializationFeature;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.RuntimeCamelException;
-import org.apache.camel.spi.Metadata;
 import org.apache.camel.spi.UriParam;
 import org.apache.camel.spi.UriParams;
 import org.apache.camel.util.ObjectHelper;
@@ -39,9 +38,9 @@ public class ServiceNowConfiguration implements Cloneable {
             JsonInclude.Include.NON_NULL
         );
 
-    @UriParam(label = "security", secret = true) @Metadata(required = "true")
+    @UriParam(label = "security", secret = true)
     private String userName;
-    @UriParam(label = "security", secret = true) @Metadata(required = "true")
+    @UriParam(label = "security", secret = true)
     private String password;
     @UriParam(label = "security", secret = true)
     private String oauthClientId;
@@ -93,6 +92,8 @@ public class ServiceNowConfiguration implements Cloneable {
     private String displayValue = "false";
     @UriParam
     private Boolean inputDisplayValue = false;
+    @UriParam(prefix = "model.", multiValue = true, javaType = "java.lang.String", description = "Defines both request and response models")
+    private transient Map<String, Class<?>> models; // field not in use as its a shortcut for both requestModels/responseModels
     @UriParam(prefix = "request-model.", multiValue = true, javaType = "java.lang.String")
     private Map<String, Class<?>> requestModels;
     @UriParam(prefix = "response-model.", multiValue = true, javaType = "java.lang.String")