From 199173928778e2e77bf96b131ee9bacad5593138 Mon Sep 17 00:00:00 2001 From: Don Oerkfitz Date: Thu, 13 May 2021 00:03:34 -0500 Subject: [PATCH] fixed runtime issue with duplicate names --- OSI-API/Controllers/ClientsController.cs | 4 ++-- OSI-API/Controllers/ExpensesController.cs | 4 ++-- OSI-API/Controllers/InvoicesController.cs | 4 ++-- OSI-API/Controllers/POsController.cs | 4 ++-- OSI-API/Controllers/PaymentsController.cs | 4 ++-- OSI-API/Controllers/ReportsController.cs | 4 ++-- OSI-API/Controllers/UsersController.cs | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/OSI-API/Controllers/ClientsController.cs b/OSI-API/Controllers/ClientsController.cs index e2a30f1..937af50 100644 --- a/OSI-API/Controllers/ClientsController.cs +++ b/OSI-API/Controllers/ClientsController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class ClientsController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Clients/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/ExpensesController.cs b/OSI-API/Controllers/ExpensesController.cs index 82e6819..86526fe 100644 --- a/OSI-API/Controllers/ExpensesController.cs +++ b/OSI-API/Controllers/ExpensesController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class ExpensesController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Expenses/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/InvoicesController.cs b/OSI-API/Controllers/InvoicesController.cs index 6aa8174..4d4e46e 100644 --- a/OSI-API/Controllers/InvoicesController.cs +++ b/OSI-API/Controllers/InvoicesController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class InvoicesController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Invoices/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/POsController.cs b/OSI-API/Controllers/POsController.cs index 516e10c..98dfb06 100644 --- a/OSI-API/Controllers/POsController.cs +++ b/OSI-API/Controllers/POsController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class POsController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/POs/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/PaymentsController.cs b/OSI-API/Controllers/PaymentsController.cs index f3cdae5..0cc051e 100644 --- a/OSI-API/Controllers/PaymentsController.cs +++ b/OSI-API/Controllers/PaymentsController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class PaymentsController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Payments/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/ReportsController.cs b/OSI-API/Controllers/ReportsController.cs index 02c2c62..dd8e6a1 100644 --- a/OSI-API/Controllers/ReportsController.cs +++ b/OSI-API/Controllers/ReportsController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class ReportsController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Reports/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value"; diff --git a/OSI-API/Controllers/UsersController.cs b/OSI-API/Controllers/UsersController.cs index 51fb69b..cfe2de5 100644 --- a/OSI-API/Controllers/UsersController.cs +++ b/OSI-API/Controllers/UsersController.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Mvc; namespace OSI.API.Controllers { - [Route("api/[controller]")] + [Route("api/v{version:apiVersion}/[controller]")] [ApiController] public class UsersController : ControllerBase { @@ -19,7 +19,7 @@ namespace OSI.API.Controllers } // GET: api/Users/5 - [HttpGet("{id}", Name = "Get")] + [HttpGet("{id}")] public string Get(int id) { return "value";