The purpose of this question/dicussion is not, how to version an API in the sense of, do you use `Version Headers` (this is my prefered option) or do you make it a url path e.g. `/api/v1/resource`, but rather how to version an API within the actual code of the API.
I have read a lot of articles about this, many of which have given possible solutions such as:
1. Having route folders labeled by their version number, then manually creating routes for each of these versioned folders. e.g. routes/v1/authRoute & routes/v2/authRoute
2. Defining in the route which version each route specific function is for. e.g. routes/auth & within auth v1: function() and v2: function
3. Programmatically generating the routes, based on the file structure of the routes folder e.g. routes/v1/auth and routes/v1/1.0/auth would end up being /app/v1/auth and app/v1/1.0/auth
So really, l was wondering, how do companies from big to small actually managed this without requiring a lot of manual effort.