WebAPI Versioning
Вставка
- Опубліковано 13 кві 2023
- You've already got clients accessing your RESTful API and now you want to provide new features. You need versioning.
Source code available at: github.com/JasperKent/API-Ver...
Topics include:
- ASP.NET Versioning
- Swagger
- Adding, removing and modifying API features
- Reusing existing features in a new C# controller
- Reporting available APIs to the client
- Defaulting to the existing API - Наука та технологія
Do your API vary much, or once published are they stable? Let me know.
Source code available at: github.com/JasperKent/API-Versioning
Remember to subscribe at ua-cam.com/channels/qWQzlUDdllnLmtgfSgYTCA.html
And if you liked the video, click the 👍.
Really great video thank you!
Clearly explained and engaging, thanks so much!
Another best tutorial thanks!
Nicely done and well explained! (:
If v2 of a controller action takes in a model with extra/modified properties, do I create a new model? And should I create a new repository class to handle v2 controller actions?
Yes, create a new model (but note my video ua-cam.com/video/6145Q1juVHI/v-deo.html on models versus entities). If the new model simply adds new properties, you might want to derive it form the old one, but it's not a big deal. I probably would create a new repository (again, maybe inheriting the interface) otherwise the existing one will just grow and grow (see ua-cam.com/video/hBeS-k80qz4/v-deo.html on the Interface Segregation Principle).
Interested in the next parts because those are the different ones. I am just curious about the decision to go straight to 2.0. Basically the summaryfortitle endpoint is a new Feature. That would mean for every Feature you raise the major Version. What if you Just add a property to an existing Model. That could be handled tolerant (by ignoring it) within the api consuming Client. Imo that would be a raise of the minor Version of the model itself.
You're absolutely right. I was focussing on the technology, but decisions over revision numbers are important too.
@@CodingTutorialsAreGo its hard to think about everything. But i guess everything can be described in the api guidelines.