You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jochen Cordes (JIRA)" <ji...@apache.org> on 2018/09/12 21:57:00 UTC
[jira] [Created] (CAMEL-12805) camel-restdsl-swagger-plugin doesn't
convert integer default value to string
Jochen Cordes created CAMEL-12805:
-------------------------------------
Summary: camel-restdsl-swagger-plugin doesn't convert integer default value to string
Key: CAMEL-12805
URL: https://issues.apache.org/jira/browse/CAMEL-12805
Project: Camel
Issue Type: Bug
Components: tooling
Affects Versions: 2.21.0
Reporter: Jochen Cordes
When generating a RouteBuilder from a swagger that defines default parameter values of type integer, there is no conversion to a string when setting it:
Swagger:
"limit":{
"name":"limit",
"in":"query",
"type":"integer",
"minimum":1,
"default":20,
"description":"the limit of the results for the collections query"
},
RouteBuilder:
.param()
.name("limit")
.type(RestParamType.query)
.dataType("integer")
.defaultValue(20)
.required(false)
.description("the limit of the results for the collections query")
.endParam()
defaultValue only accepts parameters of type string and therefore the generated code can't be compiled and needs to be corrected manually.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)