namespace DotNet.SampleMicroservice.Controllers { using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; [ApiController] [InternalApiVersion("1")] [Route("api/application/v{version:apiVersion}/[controller]")] public class InternalVersionControllerV1 : ControllerBase { [HttpGet] public Task Get() => Task.CompletedTask; } } namespace DotNet.SampleMicroservice.Controllers { using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; [ApiController] [InternalApiVersion("2")] [Route("api/application/v{version:apiVersion}/[controller]")] public class InternalVersionControllerV2 : ControllerBase { [HttpGet] public Task Get() => Task.CompletedTask; } } namespace DotNet.SampleMicroservice.Controllers { using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; [ApiController] [InternalApiVersion("3")] [Route("api/application/v{version:apiVersion}/[controller]")] public class InternalVersionControllerV3 : ControllerBase { [HttpGet] public Task Get() => Task.CompletedTask; } } namespace DotNet.SampleMicroservice.Controllers { using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; [ApiController] [AdminApiVersion("4")] [Route("api/v{version:apiVersion}/[controller]")] public class AdminVersionController : ControllerBase { [HttpGet] public Task Get() => Task.CompletedTask; } } namespace DotNet.SampleMicroservice.Controllers { using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; [ApiController] [ApiVersion("1")] [Route("api/v{version:apiVersion}/[controller]")] public class VersionController : ControllerBase { [HttpGet] public Task Get() => Task.CompletedTask; } }