From c6b1af397b6cee902642106fd70c7ed1f818a920 Mon Sep 17 00:00:00 2001 From: shi4238 <71853450+shi4238@users.noreply.github.com> Date: Sat, 3 Oct 2020 19:58:28 +0530 Subject: [PATCH 1/2] api version removed. route udpated --- Controllers/WeatherForecastController.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Controllers/WeatherForecastController.cs b/Controllers/WeatherForecastController.cs index 702f46c..7657bed 100644 --- a/Controllers/WeatherForecastController.cs +++ b/Controllers/WeatherForecastController.cs @@ -7,9 +7,7 @@ namespace welcome_api.Controllers { [ApiController] - [ApiVersion("1.0")] - [ApiVersion("2.0")] - [Route("api/v{version:apiVersion}/WeatherForecast")] + [Route("api/Weather")] public class WeatherForecastController : BaseApiController { private static readonly string[] Summaries = new[] From 4a3e084c26675f3beb78ec7253719a056e32ddc2 Mon Sep 17 00:00:00 2001 From: shi4238 <71853450+shi4238@users.noreply.github.com> Date: Sat, 3 Oct 2020 19:59:26 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index feb00ca..1a5bf1e 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,5 @@ Two versions are enabled for the API, 1.0, 2.0 - Clone the repo - do: dotnet run - server will start by default on port 5000,5001 based on launchsettings -- access the api at https://localhost:5001/api/v1/WeatherForecast -- metadata endpoint is at https://localhost:5001/api/v1/WeatherForecast/metadata +- access the api at https://localhost:5001/api/Weather +- metadata endpoint is at https://localhost:5001/api/Weather/metadata