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

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

I think it will not work with my corner case : i simplified for the ticket but, 
in fact, the resource i'm working on looks like that :

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

@Multipart is mandatory to be able to work with Attachment, and it seems i 
can't mix @FormParam and @Multipart ?

> 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)

Reply via email to