cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Przybysz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-6396) Media type parameter version not work properly when version not given in Accept header
Date Sat, 09 May 2015 22:06:59 GMT
Dominik Przybysz created CXF-6396:
-------------------------------------

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

Mime
View raw message