Add a versioning to REST api using ASP.NET Web API

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I know, there are a lot of discussions about how to version a REST web API. But if I do decide to add a version on the url, how do I go about it?

Suppose I have http://localhost/api/Person http://localhost/api/Person and want to add http://localhost/api/v2/Person http://localhost/api/v2/Person

Do I create a new controller in a different namespace? How do I add the mapping entries to route to the new controller.

Givens: It doesn t have to work without specifying a version. In other words, I don t mind breaking what I already have if that simplifies it.

Answers

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/41190498/add-a-versioning-to-rest-api-using-asp-net-web-api

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils