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.22.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.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.22.x by this push:
new c7ec43e CAMEL-13171: Fixed issue with camel-restdsl-swagger generation not able to set allowed values.
c7ec43e is described below
commit c7ec43e60f1964c18123940618e0d6ea9c431328
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 325543f..f7657f7 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
@@ -326,6 +326,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) {