From the course: Advanced Web APIs with ASP.NET Core 8
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Versioning minimal APIs - ASP.NET Core Tutorial
From the course: Advanced Web APIs with ASP.NET Core 8
Versioning minimal APIs
- [Instructor] We have been relying on controller based APIs so far. But of course, the APO net core, API versioning package also cooperates with minimal APIs. And I'll show you how this can be achieved in the most simple way. We leave the configuration as is. So we accept a query string, API version reader, so an API version in the query string. We accept a specific HTTP header, XAPI version and we also accept a version number in the accept HDP header. So that stays exactly the same. We just have to go to the definition of our minimal API, which is conveniently located in here. And basically what we are doing now is we once again create a copy of the slash products endpoint, and I just copy everything here just for the sake of demonstrating you the functionality. So we have now defined the slash products endpoint twice and we already get that warning here, that there is a conflict. Well, how do we resolve that conflict? There are two steps which we need to take. We first have to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Introduction: API versioning29s
-
(Locked)
Versioning options2m 54s
-
(Locked)
NuGet versioning packages2m 54s
-
(Locked)
Implementing URL versioning9m 12s
-
(Locked)
Implementing header versioning3m 51s
-
(Locked)
Using the Accept header for versioning2m 40s
-
(Locked)
Implementing query string versioning2m 12s
-
(Locked)
Versioning minimal APIs7m 58s
-
(Locked)
Versioning and Swagger4m 14s
-
(Locked)
-
-