CAMEL-10931: deprecated typeList and outTypeList, and removed references from 
rest-api doc


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

Branch: refs/heads/master
Commit: 7017beea4d6cf4e2ec5a868c901aa7e659806e1f
Parents: 38b5d1d
Author: Scott Cranton <sc...@cranton.com>
Authored: Fri Mar 10 08:17:00 2017 -0500
Committer: Andrea Cosentino <anco...@gmail.com>
Committed: Fri Mar 10 16:03:58 2017 +0100

----------------------------------------------------------------------
 camel-core/src/main/docs/rest-api-component.adoc      |  8 ++------
 .../org/apache/camel/model/rest/RestDefinition.java   | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7017beea/camel-core/src/main/docs/rest-api-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/rest-api-component.adoc 
b/camel-core/src/main/docs/rest-api-component.adoc
index efd4477..2036281 100644
--- a/camel-core/src/main/docs/rest-api-component.adoc
+++ b/camel-core/src/main/docs/rest-api-component.adoc
@@ -409,9 +409,7 @@ rest("/users/")
 
-----------------------------------------------------------------------------------------------------------
 
 To specify input and/or output using an array, append `[]` to the end
-of the canonical class name, or you can alternatively use the Java DSL only
-continence `typeList` and `outTypeList` where you just specify the array 
element type.
-Both approaches are shown in the following Java DSL:
+of the canonical class name as shown in the following Java DSL:
 
 [source,java]
 
-----------------------------------------------------------------------------------------------------------
@@ -422,9 +420,7 @@ 
restConfiguration().component("restlet").host("localhost").port(portNum).binding
 // use the rest DSL to define the rest services
 rest("/users/")
     .post().type(UserPojo[].class).outType(CountryPojo[].class)
-        .to("direct:newUser")
-    .put().typeList(UserPojo.class).outTypeList(CountryPojo.class)
-        .to("direct:updateUser");
+        .to("direct:newUser");
 
-----------------------------------------------------------------------------------------------------------
 
 The `UserPojo` is just a plain pojo with getter/setter as shown:

http://git-wip-us.apache.org/repos/asf/camel/blob/7017beea/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java 
b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 3cd6b2c..fd30e91 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -412,6 +412,13 @@ public class RestDefinition extends 
OptionalIdentifiedDefinition<RestDefinition>
         return this;
     }
 
+    /**
+     * @param classType the canonical class name for the array passed as input
+     *
+     * @deprecated as of 2.19.0. Replaced wtih {@link #type(Class)} with 
{@code []} appended to canonical class name
+     * , e.g. {@code type(MyClass[].class}
+     */
+    @Deprecated
     public RestDefinition typeList(Class<?> classType) {
         // add to last verb
         if (getVerbs().isEmpty()) {
@@ -435,6 +442,13 @@ public class RestDefinition extends 
OptionalIdentifiedDefinition<RestDefinition>
         return this;
     }
 
+    /**
+     * @param classType the canonical class name for the array passed as output
+     *
+     * @deprecated as of 2.19.0. Replaced wtih {@link #outType(Class)} with 
{@code []} appended to canonical class name
+     * , e.g. {@code outType(MyClass[].class}
+     */
+    @Deprecated
     public RestDefinition outTypeList(Class<?> classType) {
         // add to last verb
         if (getVerbs().isEmpty()) {

Reply via email to