Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 823 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 823 Bytes

Versioning an API - ASP.NET CORE API 5.0

Steps to version an API.

Versioning is a crucial part of API design. It gives developers the ability to improve their API without breaking the client’s applications when new updates are rolled out. There are four main strategies we can use for versioning:

1.	Version through URL
2.	Version through query string
3.	Version through the header
4.	Version through Content-Type

Add API versions in Swagger

Follow these below steps to add API versions into your Swagger page. Install required NuGet packages into your API project:

Microsoft.AspnetCore.Mvc.Versioning
Microsoft.AspnetCore.Mvc.Versioning.ApiExplorer

Authors