Hi

No this is currently not supported.
You are welcome to log a JIRA for such an improvement

On Wed, Apr 17, 2019 at 11:31 AM Arian Treffer <derar...@gmail.com> wrote:
>
> Hi everyone,
>
> I would like to let users of my REST API to specify the response
> format using ".json" or ".xml". I tried the following configuration,
> but it does not recognize "content-type" as a parameter.
>
>         rest("products/").description("Products API")
>             .get("{shortcode}/memo.{content-type}")
>                 .consumes(appJsonXml).produces(appJsonXml)
>                 .bindingMode(RestBindingMode.json_xml)
>                 .param().name("shortcode").type(RestParamType.path).endParam()
>                 .param().name("content-type").type(RestParamType.path)
>                         .allowableValues("xml", "json")
>                         .endParam()
>                 .outType(ProductMemo.class)
>                 .to("direct:products/memo")
>
> It works when I define "memo.json" and "memo.xml" as separate routes,
> but I don't want to maintain all routes twice; and it works with
> "memo/{content-type}", but that's not the standard URL format.
>
> Is there any to enable the dot as a parameter separator?
>
> Best regards,
> Arian



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to