How does API versioning work
I wanted to ask for API versioning works and how to properly implement it into ASP.NET
because to me api/v1 and api/v2 just seem like 2 controllers that basically have the same controllers just handled differently
Is there a proper way to set this up and if yes, what's the best approach for it and how to handle a version like V1 going out if support if for example V5 rolls around
2 Replies
What you mean by "api versioning" is actually what's known as RESTful, the ful in the REST means it's written according to convention.
Read more on: https://restfulapi.net/versioning/
REST API Tutorial
What is REST API Versioning and How to Create Versions?
REST API versioning helps to iterate faster when the required, breaking or non-breaking, changes are identified. Learn to devise a strategy for API versioning.
api versioning and REST are completely orthogonal @SpReeD
We do two separate controllers at work, but that's probably not the greatest way.
I found this article https://weblogs.asp.net/ricardoperes/asp-net-core-api-versioning.