What's the point of the “api” path segment in newly created ..net core API project default template
Is your feature request related to a problem? Please describe.
When I create a new API only .Net Core project the default route is [Route("api/[controller]")] resulting in something like http://localhost:1234/api/customers. When it comes time to deploy e.g api.wonderfulweb.com, then it looks like this api.wonderfulweb.com/api/customers.
Describe the solution you'd like
I can only see the point of having the api path segment if you're sharing the same project with the UI controllers which I'm clearly not since I've selected an"API" project. It seems to me the default for a single API project is wrong and it should be [Route("[controller]")] or [Route("v1/[controller]")]?
Describe alternatives you've considered
Of course it's pretty straight forward to change it, but some devs will follow this pattern like lemmings unless they are handed the solution on a plate.
Additional context
N/A
@glennc @JamesNK Do we plan to remove the "api" path segment from our Web API templates?
Yes, it's been something we intended to remove for a while but we've never done.
This is done in 3.0. The WeatherForecastController is in /weatherforecast.