I'm a tad confused - I've created an ASP.Net Core Web API MVC Project and testing out a couple of the pre-implemented endpoints but consistently getting the following response "{"id":["The value 'values' is not valid."]}".
target url : https://url/api/values
namespace Project.Api.Controllers
{
[Route("api)]
[ApiController]
public class ValuesController : ControllerBase
{
// GET api/values
[HttpGet]
public ActionResult<IEnumerable<string>> Get()
{
return new string[] { "value1", "value2" };
}
}
}
Any ideas? Thanks
api/<RouterName>so you might be using an incorrect route.RouteConfig. If you can include an example of the URI you are making a request to as well, that'd be great