camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zoran Regvart (JIRA)" <>
Subject [jira] [Commented] (CAMEL-8306) rest-dsl - Add support for wildcards to match on prefix
Date Fri, 07 Apr 2017 11:52:41 GMT


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:
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, rest
>            Reporter: Claus Ibsen
>             Fix For: Future
> See SO
> 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

View raw message