cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabien Thouny (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5351) Support @DefaultValue with @Multipart
Date Wed, 23 Oct 2013 22:54:43 GMT

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

Fabien Thouny commented on CXF-5351:
------------------------------------

Once again, you're right Sergey :-)

@FormParam works either combined with @Multipart, and so brings the support of @DefaultValue
for multipart calls.

{code}
@POST
@Consumes("multipart/form-data")
@Produces("application/xml")
Response someResource(
            @FormParam("someParam") @DefaultValue("default value")  String someParam,
            @Multipart("sound_file") Attachment attachment);
{code}

I think you can close this issue, thanks again for your help !

Fabien

> Support @DefaultValue with @Multipart
> -------------------------------------
>
>                 Key: CXF-5351
>                 URL: https://issues.apache.org/jira/browse/CXF-5351
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>    Affects Versions: 2.7.7
>            Reporter: Fabien Thouny
>            Priority: Minor
>
> It would be nice to be able to use @DefaultValue with @Multipart like we do other @*Param
> {code}
> @POST
> @Consumes("multipart/form-data")
> @Produces("application/xml")
> Response someResource(
>           @DefaultValue("default value") @Multipart(value = "someParam", required = "false")
String someParam);
> {code}
> I'm not sure if "required=false" should be mandatory. Perhaps it should be implied by
@DefaultValue ?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message