We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 299e1b1 commit 934ffb5Copy full SHA for 934ffb5
Supermarket/V1/Controllers/AboutController.cs
@@ -1,15 +1,25 @@
1
using Microsoft.AspNetCore.Mvc;
2
+using Microsoft.Extensions.Logging;
3
4
namespace Supermarket.V1.Controller
5
{
6
[ApiController]
- [ApiVersion("1.0")]
7
+ [ApiVersion("1.0", Deprecated = true)]
8
[Route("api/v{version:apiVersion}/[controller]")]
9
public class AboutController : ControllerBase
10
11
+ private readonly ILogger<AboutController> _logger;
12
+
13
+ public AboutController(ILogger<AboutController> logger)
14
+ {
15
+ _logger = logger;
16
+ }
17
18
[HttpGet]
19
public IActionResult Get()
20
21
+ _logger.LogInformation("Still consuming deprecated api method");
22
23
return Ok(new { message = "This is about Api Version 1.0" });
24
}
25
0 commit comments