Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Ensure that all MediaType annotations put XML before json.
Browse files Browse the repository at this point in the history
    The cli client was requesting json for version because it was
    first in the list, then was not prepared to parse it. This
    change ensures that the client will request xml to avoid the
    json parsing issue.
  • Loading branch information
davidmason committed Oct 29, 2013
1 parent 7339e13 commit f88e8e5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Expand Up @@ -44,8 +44,8 @@
/**
* Client Interface for the Translation Resources service.
*/
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public interface ITranslatedDocResource extends TranslatedDocResource {
@GET
@Path(RESOURCE_SLUG_TEMPLATE + "/translations/{locale}")
Expand Down
Expand Up @@ -39,8 +39,8 @@
public interface IVersionResource extends VersionResource {
@Override
@GET
@Produces({ MediaTypes.APPLICATION_ZANATA_VERSION_JSON,
MediaTypes.APPLICATION_ZANATA_VERSION_XML })
@Produces({ MediaTypes.APPLICATION_ZANATA_VERSION_XML,
MediaTypes.APPLICATION_ZANATA_VERSION_JSON })
public ClientResponse<VersionInfo> get();

}
Expand Up @@ -7,8 +7,8 @@

@Path(TranslatedDocResource.SERVICE_PATH)
@org.codehaus.enunciate.modules.jersey.ExternallyManagedLifecycle
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
interface TranslatedDocResource extends
org.zanata.rest.service.TranslatedDocResource {
}
Expand Up @@ -51,8 +51,8 @@
* href="mailto:sflaniga@redhat.com">sflaniga@redhat.com</a>
*
*/
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Consumes({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public interface TranslatedDocResource {
public static final String SERVICE_PATH =
ProjectIterationResource.SERVICE_PATH + "/r";
Expand Down
Expand Up @@ -49,8 +49,8 @@ public interface VersionResource {
* the server while performing this operation.
*/
@GET
@Produces({ MediaTypes.APPLICATION_ZANATA_VERSION_JSON,
MediaTypes.APPLICATION_ZANATA_VERSION_XML })
@Produces({ MediaTypes.APPLICATION_ZANATA_VERSION_XML,
MediaTypes.APPLICATION_ZANATA_VERSION_JSON })
@TypeHint(VersionInfo.class)
public Response get();

Expand Down

0 comments on commit f88e8e5

Please sign in to comment.