In a WEB API controller, can we have the same method name with different HTTP Verbs?
[HttpGet]
public string Test()
{
return \"
Add seperate route on your conflicting methods. Such as [Route("GetByType")]
above of one and [Route("GetById")]
on another.
OR, for ASP.NET Core, on startup file for swagger add the below configuration:
services.AddSwaggerGen(options =>
{
options.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
}