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 2019/02/15 08:06:43 UTC
[camel] branch camel-2.x updated: CAMEL-13171: Fixed issue with
camel-restdsl-swagger generation not able to set allowed values.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push:
new 8c24b79 CAMEL-13171: Fixed issue with camel-restdsl-swagger generation not able to set allowed values.
8c24b79 is described below
commit 8c24b797512efbb8e88944738df6bb1df47acb3b
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Feb 15 09:05:32 2019 +0100
CAMEL-13171: Fixed issue with camel-restdsl-swagger generation not able to set allowed values.
---
.../org/apache/camel/model/rest/RestOperationParamDefinition.java | 8 ++++++++
1 file changed, 8 insertions(+)
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 d528a77..821460d 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
@@ -327,6 +327,14 @@ public class RestOperationParamDefinition {
}
/**
+ * Allowed values of the parameter when its an enum type
+ */
+ public RestOperationParamDefinition allowableValues(String allowableValues) {
+ setAllowableValues(Arrays.asList(allowableValues.split(",")));
+ return this;
+ }
+
+ /**
* The parameter type such as body, form, header, path, query
*/
public RestOperationParamDefinition type(RestParamType type) {