[aerogear-dev] REST-based API Versioning

Erik Jan de Wit edewit at redhat.com
Fri Sep 12 04:58:25 EDT 2014


On 2 Sep,2014, at 9:27 , tolis emmanouilidis <tolisemm at gmail.com> wrote:

> Hi Eric,
> 
> I have tried the jax-rs @Produces annotation both at method and class levels as shown here (http://docs.oracle.com/cd/E19798-01/821-1841/gipzh/index.html) and it works for me. I don't have to specify the Content-Type header in the request.The resource method or endpoint is chosen according the Accept header.
> 

You are right, I must have done something wrong.

> 
> class level
> 
> @Path("/members")
> @RequestScoped
> @Produces({"application/vnd.aerogear.v102+json"})
> public class MemberResourceRESTServiceV102 {
> 
> @Path("/members")
> @RequestScoped
> @Produces({"application/vnd.aerogear.v101+json"})
> public class MemberResourceRESTService {
> 

So this is also an option of doing it, what option do you like the best?

Cheers,
	Erik Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/aerogear-dev/attachments/20140912/e0fa7088/attachment.html 


More information about the aerogear-dev mailing list