[ 
https://issues.apache.org/jira/browse/CAMEL-8306?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960649#comment-15960649
 ] 

Zoran Regvart commented on CAMEL-8306:
--------------------------------------

I don't think that we should build another router, I think that we could have 
an API contract between the REST DSL and the implementing HTTP transport 
component that can percolate this information to it. This can be as simple as 
passing {{matchOnUriPrefix}} to the HTTP transport component in this case. With 
Spring Web MVC you have a lot of options to map requests to handlers, and one 
of the option is Ant style globs like {{/path/**}} that matches all nested 
paths within {{/path}}, but you also have regex support and you can implement 
custom {{HandlerMapping}} that maps in whatever way you feel is needed.
I don't see the need for Camel to match competencies of other Web frameworks, 
that is not it's core strength, but detecting {{*}} or {{**}} and passing that 
on to the HTTP transport as {{matchOnUriPrefix}} property should suffice.

> rest-dsl - Add support for wildcards to match on prefix
> -------------------------------------------------------
>
>                 Key: CAMEL-8306
>                 URL: https://issues.apache.org/jira/browse/CAMEL-8306
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, rest
>            Reporter: Claus Ibsen
>             Fix For: Future
>
>
> See SO
> http://stackoverflow.com/questions/28264748/regex-on-camel-rest-component
> eg if we add support for using * as a wildcard then people can do rest paths 
> with * as suffix, to indicate that it should match by wildcard
> eg
>  rest("/api/user/*") 
> To match
> - /api/user
> - /api/user/foo
> -/api/user/foo/bar
> As * requires support from the underlying component, but most of them support 
> that too, eg servlet / jetty / netty-http etc so likely we should be able to 
> do this



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to