On Fri, Mar 22, 2019 at 2:17 AM Nuwan Bandara <nu...@wso2.com> wrote:

> Hi All,
>
> I stumbled upon one of Roy Fielding tweets -
> https://twitter.com/fielding/status/376835835670167552 :)
>

I unfortunately don't agree with this tweet :). I don't understand how
having a v1 makes your API non-evolvable. IMO the sole purpose of having v1
is to say the API will/should evolve to v2, v3, likewise.

>
> and started digging bit on api versioning. Right now we encourage API-M
> users to make API versions explicit in the API URI. which means a sample
> URI is /{context}/{version}/{resource}
>
> example: /pizzahut/v1/order
>
> however this is not the best option. We are gateway providers, IMO we
> should give options.
>

We give an option to omit the version from the URI by marking the API as
the default version to route to. So you can access this API through
/pizzahut/order (no need v1). The gateway will route the request to
whatever version is selected as primary (default).

>
> some good alternatives are allow API developers to use headers to
> communicate version info like
>
> GET /pizzahut/order
> Accept: application/vnd.pizza.order.v1+json
>
> or something similar.
>
> I know we can handle custom headers in mediation, but we should provide
> this by default, maybe provide that as the default option rather than URL
> based explicit option.
>
> Some good reading -
> https://www.mnot.net/blog/2012/12/04/api-evolution.html
>
> Regards,
> /Nuwan
>
> --
>
>
> *Thanks & Regards,*
> *Nuwan Bandara | Director - **Solutions Architecture,  WSO2 Inc.*
> *+1 646 643 8618 | +1 650 745 2169 Ext 4212 | http://nuwanbando.com
> <http://nuwanbando.com> *
> <http://www.nuwanbando.com/>
>


-- 
*Nuwan Dias* | Director | WSO2 Inc.
(m) +94 777 775 729 | (e) nuw...@wso2.com
[image: Signature.jpg]
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to