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/04/02 10:13:59 UTC
[1/5] camel git commit: CAMEL-9796: Deprecate access from rest-dsl as
its not in use.
Repository: camel
Updated Branches:
refs/heads/camel-2.16.x 1a5cb8859 -> 34cc650d0
refs/heads/camel-2.17.x aba716ce3 -> 41fe473e0
refs/heads/master 41a851893 -> 099270ed9
CAMEL-9796: Deprecate access from rest-dsl as its not in use.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/099270ed
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/099270ed
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/099270ed
Branch: refs/heads/master
Commit: 099270ed997817c59c12babe4e098f4b32f4139d
Parents: 41a8518
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 2 09:11:29 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 2 09:19:28 2016 +0200
----------------------------------------------------------------------
.../camel/model/rest/RestOperationParamDefinition.java | 12 ++++++++++++
.../component/rest/FromRestExplicitComponentTest.java | 4 ++--
.../apache/camel/component/rest/FromRestGetTest.java | 6 ++----
.../component/rest/FromRestIdAndDescriptionTest.java | 4 ++--
.../apache/camel/management/ManagedFromRestGetTest.java | 8 ++++----
.../management/ManagedFromRestPlaceholderTest.java | 8 ++++----
.../component/rest/SpringFromRestConfigurationTest.xml | 4 ++--
.../camel/component/rest/SpringFromRestGetTest.xml | 4 ++--
.../rest/SpringFromRestIdAndDescriptionTest.xml | 4 ++--
.../org/apache/camel/swagger/RestSwaggerReader.java | 1 -
.../test/blueprint/component/rest/FromRestGetTest.java | 2 --
.../component/rest/FromRestConfigurationTest.xml | 4 ++--
.../test/blueprint/component/rest/FromRestGetTest.xml | 4 ++--
.../component/rest/FromRestIdAndDescriptionTest.xml | 4 ++--
14 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
index c60db00..e98e7c1 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
@@ -193,13 +193,22 @@ public class RestOperationParamDefinition {
this.allowableValues = allowableValues;
}
+ /**
+ * Gets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
+ */
+ @Deprecated
public String getAccess() {
return access != null ? access : "";
}
/**
* Sets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public void setAccess(String access) {
this.access = access;
}
@@ -289,7 +298,10 @@ public class RestOperationParamDefinition {
/**
* Parameter access. Use <tt>false</tt> or <tt>internal</tt> to indicate the parameter
* should be hidden for the public.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public RestOperationParamDefinition access(String paramAccess) {
setAccess(paramAccess);
return this;
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
index 44d56e8..8236d7d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
@@ -36,10 +36,10 @@ public class FromRestExplicitComponentTest extends FromRestGetTest {
rest("dummy-rest").path("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
index 7fb9e17..bfafb14 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
@@ -77,8 +77,6 @@ public class FromRestGetTest extends ContextTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("rate", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getName());
@@ -114,10 +112,10 @@ public class FromRestGetTest extends ContextTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
index c857505..7c1010a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
@@ -54,10 +54,10 @@ public class FromRestIdAndDescriptionTest extends FromRestGetTest {
rest("/say/bye").description("bye", "Bye Service", "en")
.get().description("Says bye to you").consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
index 6d3ec6c..5aa9ec7 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
@@ -63,9 +63,9 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\""));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -92,10 +92,10 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
index 40d4057..6eec89b 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
@@ -70,9 +70,9 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\">"));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -99,10 +99,10 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
rest("{{bar}}")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
index 4c543c7..45082a8 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
@@ -44,7 +44,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -52,7 +52,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
index f98b41c..b33c738 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
@@ -34,7 +34,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -42,7 +42,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
index d69d494..d06a906 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
@@ -38,7 +38,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -46,7 +46,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 5bcbcfe..8ae5088 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -243,7 +243,6 @@ public class RestSwaggerReader {
if (parameter != null) {
parameter.setName(param.getName());
- parameter.setAccess(param.getAccess());
parameter.setDescription(param.getDescription());
parameter.setRequired(param.getRequired());
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
index deefa84..9985c9b 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
@@ -74,8 +74,6 @@ public class FromRestGetTest extends CamelBlueprintTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("rate", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getName());
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
index 997186d..cf0f222 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
@@ -39,7 +39,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -47,7 +47,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
index bc87c1c..8ca4ab8 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
@@ -32,7 +32,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -40,7 +40,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/099270ed/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
index 3af51df..3e361cd 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
@@ -36,7 +36,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -44,7 +44,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
[3/5] camel git commit: CAMEL-9796: Deprecate access from rest-dsl as
its not in use.
Posted by da...@apache.org.
CAMEL-9796: Deprecate access from rest-dsl as its not in use.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/41fe473e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/41fe473e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/41fe473e
Branch: refs/heads/camel-2.17.x
Commit: 41fe473e07d7de502ce6ff1e9b87caa9912de95a
Parents: b3c5c82
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 2 10:13:16 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 2 10:13:16 2016 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/swagger/RestSwaggerReader.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/41fe473e/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 8ae5088..aba2d93 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -244,6 +244,7 @@ public class RestSwaggerReader {
if (parameter != null) {
parameter.setName(param.getName());
parameter.setDescription(param.getDescription());
+ parameter.setAccess(param.getAccess());
parameter.setRequired(param.getRequired());
// set type on parameter
[2/5] camel git commit: CAMEL-9796: Deprecate access from rest-dsl as
its not in use.
Posted by da...@apache.org.
CAMEL-9796: Deprecate access from rest-dsl as its not in use.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b3c5c821
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b3c5c821
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b3c5c821
Branch: refs/heads/camel-2.17.x
Commit: b3c5c821c796262c6d5ea9f86b1874afddc220d1
Parents: aba716c
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 2 09:11:29 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 2 10:12:20 2016 +0200
----------------------------------------------------------------------
.../camel/model/rest/RestOperationParamDefinition.java | 12 ++++++++++++
.../component/rest/FromRestExplicitComponentTest.java | 4 ++--
.../apache/camel/component/rest/FromRestGetTest.java | 6 ++----
.../component/rest/FromRestIdAndDescriptionTest.java | 4 ++--
.../apache/camel/management/ManagedFromRestGetTest.java | 8 ++++----
.../management/ManagedFromRestPlaceholderTest.java | 8 ++++----
.../component/rest/SpringFromRestConfigurationTest.xml | 4 ++--
.../camel/component/rest/SpringFromRestGetTest.xml | 4 ++--
.../rest/SpringFromRestIdAndDescriptionTest.xml | 4 ++--
.../org/apache/camel/swagger/RestSwaggerReader.java | 1 -
.../test/blueprint/component/rest/FromRestGetTest.java | 2 --
.../component/rest/FromRestConfigurationTest.xml | 4 ++--
.../test/blueprint/component/rest/FromRestGetTest.xml | 4 ++--
.../component/rest/FromRestIdAndDescriptionTest.xml | 4 ++--
14 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
index c60db00..e98e7c1 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
@@ -193,13 +193,22 @@ public class RestOperationParamDefinition {
this.allowableValues = allowableValues;
}
+ /**
+ * Gets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
+ */
+ @Deprecated
public String getAccess() {
return access != null ? access : "";
}
/**
* Sets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public void setAccess(String access) {
this.access = access;
}
@@ -289,7 +298,10 @@ public class RestOperationParamDefinition {
/**
* Parameter access. Use <tt>false</tt> or <tt>internal</tt> to indicate the parameter
* should be hidden for the public.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public RestOperationParamDefinition access(String paramAccess) {
setAccess(paramAccess);
return this;
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
index 44d56e8..8236d7d 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
@@ -36,10 +36,10 @@ public class FromRestExplicitComponentTest extends FromRestGetTest {
rest("dummy-rest").path("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
index 7fb9e17..bfafb14 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
@@ -77,8 +77,6 @@ public class FromRestGetTest extends ContextTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("rate", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getName());
@@ -114,10 +112,10 @@ public class FromRestGetTest extends ContextTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
index c857505..7c1010a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
@@ -54,10 +54,10 @@ public class FromRestIdAndDescriptionTest extends FromRestGetTest {
rest("/say/bye").description("bye", "Bye Service", "en")
.get().description("Says bye to you").consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class)
.header("rate").description("Rate limit").dataType("integer").endHeader()
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
index 6d3ec6c..5aa9ec7 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
@@ -63,9 +63,9 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\""));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -92,10 +92,10 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
index 40d4057..6eec89b 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
@@ -70,9 +70,9 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\">"));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -99,10 +99,10 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
rest("{{bar}}")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
index 4c543c7..45082a8 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
@@ -44,7 +44,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -52,7 +52,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
index f98b41c..b33c738 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
@@ -34,7 +34,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -42,7 +42,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
index d69d494..d06a906 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
@@ -38,7 +38,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -46,7 +46,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 5bcbcfe..8ae5088 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -243,7 +243,6 @@ public class RestSwaggerReader {
if (parameter != null) {
parameter.setName(param.getName());
- parameter.setAccess(param.getAccess());
parameter.setDescription(param.getDescription());
parameter.setRequired(param.getRequired());
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
index deefa84..9985c9b 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
@@ -74,8 +74,6 @@ public class FromRestGetTest extends CamelBlueprintTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("rate", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getName());
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
index 997186d..cf0f222 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
@@ -39,7 +39,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -47,7 +47,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
index bc87c1c..8ca4ab8 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
@@ -32,7 +32,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -40,7 +40,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/b3c5c821/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
index 3af51df..3e361cd 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
@@ -36,7 +36,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -44,7 +44,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
[4/5] camel git commit: CAMEL-9796: Deprecate access from rest-dsl as
its not in use.
Posted by da...@apache.org.
CAMEL-9796: Deprecate access from rest-dsl as its not in use.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ef94944b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ef94944b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ef94944b
Branch: refs/heads/camel-2.16.x
Commit: ef94944bbe3d1ad6cf0b57c86206ba2ca4a638ee
Parents: 1a5cb88
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 2 09:11:29 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 2 10:13:38 2016 +0200
----------------------------------------------------------------------
.../camel/model/rest/RestOperationParamDefinition.java | 12 ++++++++++++
.../component/rest/FromRestExplicitComponentTest.java | 4 ++--
.../apache/camel/component/rest/FromRestGetTest.java | 6 ++----
.../component/rest/FromRestIdAndDescriptionTest.java | 4 ++--
.../apache/camel/management/ManagedFromRestGetTest.java | 8 ++++----
.../management/ManagedFromRestPlaceholderTest.java | 8 ++++----
.../component/rest/SpringFromRestConfigurationTest.xml | 4 ++--
.../camel/component/rest/SpringFromRestGetTest.xml | 4 ++--
.../rest/SpringFromRestIdAndDescriptionTest.xml | 4 ++--
.../org/apache/camel/swagger/RestSwaggerReader.java | 1 -
.../test/blueprint/component/rest/FromRestGetTest.java | 2 --
.../component/rest/FromRestConfigurationTest.xml | 4 ++--
.../test/blueprint/component/rest/FromRestGetTest.xml | 4 ++--
.../component/rest/FromRestIdAndDescriptionTest.xml | 4 ++--
14 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
index 122cc03..eafaa09 100644
--- a/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/rest/RestOperationParamDefinition.java
@@ -193,13 +193,22 @@ public class RestOperationParamDefinition {
this.allowableValues = allowableValues;
}
+ /**
+ * Gets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
+ */
+ @Deprecated
public String getAccess() {
return access != null ? access : "";
}
/**
* Sets the Swagger Parameter paramAccess flag.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public void setAccess(String access) {
this.access = access;
}
@@ -289,7 +298,10 @@ public class RestOperationParamDefinition {
/**
* Parameter access. Use <tt>false</tt> or <tt>internal</tt> to indicate the parameter
* should be hidden for the public.
+ *
+ * @deprecated is not in use in swagger specification 2.0
*/
+ @Deprecated
public RestOperationParamDefinition access(String paramAccess) {
setAccess(paramAccess);
return this;
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
index 2a13baf..1c8266f 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestExplicitComponentTest.java
@@ -36,10 +36,10 @@ public class FromRestExplicitComponentTest extends FromRestGetTest {
rest("dummy-rest").path("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.responseMessage().code("error").message("does not work").endResponseMessage()
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
index 35081a2..a0af5de 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestGetTest.java
@@ -77,8 +77,6 @@ public class FromRestGetTest extends ContextTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("error", rest.getVerbs().get(0).getResponseMsgs().get(1).getCode());
@@ -111,10 +109,10 @@ public class FromRestGetTest extends ContextTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.responseMessage().code("error").message("does not work").endResponseMessage()
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
index 68941b0..ed6416a 100644
--- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
+++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestIdAndDescriptionTest.java
@@ -54,10 +54,10 @@ public class FromRestIdAndDescriptionTest extends FromRestGetTest {
rest("/say/bye").description("bye", "Bye Service", "en")
.get().description("Says bye to you").consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues("1", "2", "3", "4")
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues("a", "b", "c", "d")
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.responseMessage().code("error").message("does not work").endResponseMessage()
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
index 6d3ec6c..5aa9ec7 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestGetTest.java
@@ -63,9 +63,9 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\""));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -92,10 +92,10 @@ public class ManagedFromRestGetTest extends ManagementTestSupport {
rest("/say/bye")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
index 40d4057..6eec89b 100644
--- a/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
+++ b/camel-core/src/test/java/org/apache/camel/management/ManagedFromRestPlaceholderTest.java
@@ -70,9 +70,9 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
assertTrue(xml.contains("</rests>"));
assertTrue(xml.contains("<param name=\"header_letter\" type=\"query\" description=\"header param description2\""
- + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\" access=\"acc2\">"));
+ + " defaultValue=\"b\" required=\"false\" collectionFormat=\"multi\" dataType=\"string\">"));
assertTrue(xml.contains("<param name=\"header_count\" type=\"header\" description=\"header param description1\" "
- + "defaultValue=\"1\" required=\"true\" dataType=\"integer\" access=\"acc1\">"));
+ + "defaultValue=\"1\" required=\"true\" dataType=\"integer\">"));
assertTrue(xml.contains("<value>1</value>"));
assertTrue(xml.contains("<value>a</value>"));
@@ -99,10 +99,10 @@ public class ManagedFromRestPlaceholderTest extends ManagementTestSupport {
rest("{{bar}}")
.get().consumes("application/json")
.param().type(RestParamType.header).description("header param description1").dataType("integer").allowableValues(Arrays.asList("1", "2", "3", "4"))
- .defaultValue("1").name("header_count").required(true).access("acc1")
+ .defaultValue("1").name("header_count").required(true)
.endParam().
param().type(RestParamType.query).description("header param description2").dataType("string").allowableValues(Arrays.asList("a", "b", "c", "d"))
- .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false).access("acc2")
+ .defaultValue("b").collectionFormat(CollectionFormat.multi).name("header_letter").required(false)
.endParam()
.responseMessage().code(300).message("test msg").responseModel(Integer.class).endResponseMessage()
.to("direct:bye")
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
index 062e2bb..1784f01 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestConfigurationTest.xml
@@ -41,7 +41,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -49,7 +49,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
index 66833de..724045a 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestGetTest.xml
@@ -34,7 +34,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -42,7 +42,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
index 5e838fd..f5ee102 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/component/rest/SpringFromRestIdAndDescriptionTest.xml
@@ -38,7 +38,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -46,7 +46,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 37cc1e1..8c8daa4 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -238,7 +238,6 @@ public class RestSwaggerReader {
if (parameter != null) {
parameter.setName(param.getName());
- parameter.setAccess(param.getAccess());
parameter.setDescription(param.getDescription());
parameter.setRequired(param.getRequired());
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
index d13020f..169ae83 100644
--- a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
@@ -74,8 +74,6 @@ public class FromRestGetTest extends CamelBlueprintTestSupport {
assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
- assertEquals("acc1", rest.getVerbs().get(0).getParams().get(0).getAccess());
- assertEquals("acc2", rest.getVerbs().get(0).getParams().get(1).getAccess());
assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
assertEquals("test msg", rest.getVerbs().get(0).getResponseMsgs().get(0).getMessage());
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
index 511e029..10716cf 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
@@ -39,7 +39,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -47,7 +47,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
index 1816f71..2107163 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml
@@ -32,7 +32,7 @@
</rest>
<rest path="/say/bye">
<get consumes="application/json">
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -40,7 +40,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
http://git-wip-us.apache.org/repos/asf/camel/blob/ef94944b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
----------------------------------------------------------------------
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
index 5247dfd..6bcc3cc 100644
--- a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml
@@ -36,7 +36,7 @@
<description lang="en">Bye Service</description>
<get consumes="application/json">
<description>Says bye to you</description>
- <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true" access="acc1">
+ <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
<allowableValues>
<value>1</value>
<value>2</value>
@@ -44,7 +44,7 @@
<value>4</value>
</allowableValues>
</param>
- <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false" access="acc2">
+ <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
<allowableValues>
<value>a</value>
<value>b</value>
[5/5] camel git commit: CAMEL-9796: Deprecate access from rest-dsl as
its not in use.
Posted by da...@apache.org.
CAMEL-9796: Deprecate access from rest-dsl as its not in use.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/34cc650d
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/34cc650d
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/34cc650d
Branch: refs/heads/camel-2.16.x
Commit: 34cc650d092efe3ad084149cb4fb510d4b7cd63d
Parents: ef94944
Author: Claus Ibsen <da...@apache.org>
Authored: Sat Apr 2 10:13:16 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Sat Apr 2 10:13:45 2016 +0200
----------------------------------------------------------------------
.../src/main/java/org/apache/camel/swagger/RestSwaggerReader.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/34cc650d/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
----------------------------------------------------------------------
diff --git a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
index 8c8daa4..4b65bd7 100644
--- a/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
+++ b/components/camel-swagger-java/src/main/java/org/apache/camel/swagger/RestSwaggerReader.java
@@ -239,6 +239,7 @@ public class RestSwaggerReader {
if (parameter != null) {
parameter.setName(param.getName());
parameter.setDescription(param.getDescription());
+ parameter.setAccess(param.getAccess());
parameter.setRequired(param.getRequired());
// set type on parameter