Hi,<div>I'm currently working on scaffolding AG-controller stuff and for that I'm relying on the REST endpoints generated by the forge REST plugin. A typical method's signature of a generated endpoint looks like that :</div>
<div><br></div><div><div><b>public Response findById(Long id)</b></div></div><div><br></div><div>But an AG Controller route definition can't point to such a target method since it only support Strings as parameters : </div>
<div><br></div><div><b>route().from("/customers/{id}").on(RequestMethod.GET).consumes(JSON).produces(JSON).to(CustomerEndpoint.class).findById(param("id"));</b></div><div><b><br></b></div><div>Of course, the quick workaround would be to change the signature of the endpoint to :</div>
<div><br></div><div><b>public Response findById(String id)</b></div><div><b><br></b></div><div>But, in my particular case, after the scaffolding happens I can't really tell the developers : "Well, now you have to change manually all the signature of your endpoints and convert your Strings to Longs". </div>
<div>Another use case could be an application having existing endpoints used by a Application A and we introduce Application B using AG controller. More generally, I think it would be a nice addition to AG controller.</div>
<div><br></div><div>I've already proposed a pull request[1] that can't handle all the types which have a constructor with a single String parameter : Long, Integer, BigDecimal, etc ... And also added unit tests to be sure I doesn't break</div>
<div><br></div><div>Feedback is more than welcome ! </div><div><br></div><div>Seb</div><div>[1] <a href="https://github.com/aerogear/aerogear-controller/pull/55">https://github.com/aerogear/aerogear-controller/pull/55</a></div>
<div><br></div>