camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mariano Gonzalez (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-9312) Rest DSL should support defaulting values for path parameters and query strings
Date Mon, 04 Jan 2016 15:53:40 GMT

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

Mariano Gonzalez edited comment on CAMEL-9312 at 1/4/16 3:53 PM:
-----------------------------------------------------------------

If we take the following JAX-RS endpoint:

{code:java}
@GET
@Path("{cardNumber}")
@Description( value = "Get Account Details for provided card number.", target = DocTarget.METHOD
)
public String getAccountDetails(@PathParam("cardNumber") final String cardNumber,
						   @DefaultValue("mdm") @QueryParam("hhid") final String houseHoldProvider ) {
	....
}
{code}

We are able to default query parameters in case the client side does not send it. It will
be great if `camel-rest-dsl` allows this same behavior.

Please let me know if I make myself clear.


was (Author: eschizoid):
If we take the following JAX-RS endpoint:

````
@GET
@Path("{cardNumber}")
@Description( value = "Get Account Details for provided card number.", target = DocTarget.METHOD
)
public String getAccountDetails(@PathParam("cardNumber") final String cardNumber,
						   @DefaultValue("mdm") @QueryParam("hhid") final String houseHoldProvider ) {
	....
}
````

We are able to default query parameters in case the client side does not send it. It will
be great if `camel-rest-dsl` allows this same behavior.

Please let me know if I make myself clear.

> Rest DSL should support defaulting values for path parameters and query strings
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-9312
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9312
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core, rest
>    Affects Versions: 2.16.0
>            Reporter: Mariano Gonzalez
>            Priority: Minor
>              Labels: features
>
> Popular restful implementations such as plain JAX-RS or Spring MVC support defaulting
values for path parameters and query strings. Camel rest DSL should support this same behavior
in order to make easy it to use.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message