[Route("/api/v1/{foo}")] public class MyController : Controller { public async Task<IActionResult> MyEndpoint(int foo) { } }