QUOTE(life4 @ Feb 27 2021, 04:09 PM)
Yea i am more asking the internal implementation part how to version it more elegantly as the routing part as none of the concern here.
Then your concern is about refactoring, not so much on versioning. Like others have said, there's no 100% solution for this, it all depends on your requirements and the context of your problem. There's such a thing as over-engineering, where you try to solve for problems that don't exist yet.
Generally avoid inheritance where you can, and compose so you can switch out the classes as necessary without impacting the "flow".