asp.net - Restful API: implement version handling -


i have deference version of api in same domain , want manage putting version number in url below

mydomain.com/api/v1/user/getall mydomain.com/api/v1/user/add  mydomain.com/api/v2/user/getall mydomain.com/api/v2/user/add 

imagine scenario: user in both version has same functionality add changed in v2. wanna implement versioning, found tow approach aim.

  1. use v1 , v2 in routing , manage versioning in application (u.e : sdammann webapi versioning )
  2. manage versioning source controllers , web servers ( each version exists branch , in case of asp.net(iis) create sub-application each version)

in first approach think have copy controller s , action, if found bug example in user action must change in both action (redundancy)

in second approach if happened bug must checkout old branch, fix , merge new version branch.

dose exists better approach manage , implementation of api versioning ?

branching different service versions lead deployment nightmare, because need maintain/test/deploy lot of separate applications @ same time. so, idea single application , proper routing system in looks more promising me. but, need guarantee don't have shared code pathways, otherwise introduce new problems in 1 version working another. duplicating? believe inevitable @ degree anyway, if want separate versions on code level guarantee safe modifications. professionals think don't need perform bug-fixing in old versions: bug-fix introduces new service version.


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -