On API Versioning

James Bowes jbowes at redhat.com
Tue Apr 27 13:31:31 UTC 2010


On Tue, Apr 27, 2010 at 10:26:40AM -0300, Devan Goodwin wrote:
> The v2 in the URL is gross but it would help with keeping the code
> reusable I think as we could fork to different resources inheriting
> from common parent classes. Not sure if we could do the same with
> media type checking, at least not as easily.
>

Perhaps we could check the media type in a servlet filter and send the
request to a completely different set of resources? I prefer the
explicit version in the url, however.


> Would the plain URL always be the latest and greatest with vX for
> those who want stability? Or is it no vX assumed to be v1 and we
> increment for all future releases.

You'd have to keep the plain url as v1 to not break existing clients.

> 
> On Tue, Apr 27, 2010 at 10:21 AM, Bryan Kearney <bkearney at redhat.com> wrote:
> > One of the backlog items talks about API versioning:
> >
> > (E2) As an application integrator, I would like to define what version
> > of the API I support in order to be protected from API changes.
> >
> > The currenting thinking I am hearing is that you could use the media
> > type for this, but it would be easier to just use the URL Path
> >
> > /candlepin/some/resource
> > candlepin/v2/some/resource
> >
> > where no v implies v1.
> >
> > If folks are comfortable with that, it would mean no work until we do
> > v2. I would move this off the backlog unless there were concerns.
> >
> > Comments?
> >
> > -- bk
> > _______________________________________________
> > candlepin mailing list
> > candlepin at lists.fedorahosted.org
> > https://fedorahosted.org/mailman/listinfo/candlepin
> >
> 
> 
> 
> -- 
> Devan Goodwin <dgoodwin at rm-rf.ca>
> http://rm-rf.ca
> _______________________________________________
> candlepin mailing list
> candlepin at lists.fedorahosted.org
> https://fedorahosted.org/mailman/listinfo/candlepin

-James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/candlepin/attachments/20100427/d492cb24/attachment.sig>


More information about the candlepin mailing list