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

Sergey Beryozkin commented on CXF-6396:
---------------------------------------

The runtime does not know what a custom media type 'version' attribute is, what 
semantics are behind it, etc

> Media type parameter version not work properly when version not given in 
> Accept header
> --------------------------------------------------------------------------------------
>
>                 Key: CXF-6396
>                 URL: https://issues.apache.org/jira/browse/CXF-6396
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Dominik Przybysz
>
> I have created a following JAX-RS webservice with operations
>     @GET
>     @Produces("application/vnd.test+json; version=1")
>     public String getV1() {
>         return "{'v':'v1'}";
>     }
>     @GET
>     @Produces("application/vnd.test+json; version=2")
>     public String getV2() {
>         return "{'v':'v2'}";
>     }
> When I set Accept header to "application/vnd.test+json; version=2" then I 
> receive {'v':'v2'} and it is ok.
> When I set Accept header to "application/vnd.test+json; version=1" then I 
> receive {'v':'v1'} and it is ok.
> When I set Accept header to "application/vnd.test+json" then I receive 
> {'v':'v1'} and it is not ok, because I should receive the most recent version.



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

Reply via email to