Skip to content

Instantly share code, notes, and snippets.

@gavilanch
Created June 4, 2020 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gavilanch/d887e605d744e36d0591176b5e31393d to your computer and use it in GitHub Desktop.
Save gavilanch/d887e605d744e36d0591176b5e31393d to your computer and use it in GitHub Desktop.
// Version 1
namespace WebApiSwaggerVersion.Controllers.V1
{
[ApiController]
[Route("api/v1/[controller]")]
public class WeatherForecastController : ControllerBase
{...}
}
// Version 2
namespace WebApiSwaggerVersion.Controllers.V2
{
[ApiController]
[Route("api/v2/[controller]")]
public class WeatherForecastController : ControllerBase
{...}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment