-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSwagStudio generating wrong endpoint address #843
Comments
The routes are appended but i think they only need to be appended if the httpget route does not start with /. Id say this is a bug... |
We need to add this check here Can you confirm that the class route is ignored when the operation route starts with /? What asp.net version are you working with? |
I'm using asp.net core.
[Route("Home")]
public class HomeController : Controller
{
[Route("")] // Combines to define the route template "Home"
[Route("Index")] // Combines to define the route template "Home/Index"
[Route("/")] // Does not combine, defines the route template ""
public IActionResult Index()
{
ViewData["Message"] = "Home index";
var url = Url.Action("Index", "Home");
ViewData["Message"] = "Home index" + "var url = Url.Action; = " + url;
return View();
}
[Route("About")] // Combines to define the route template "Home/About"
public IActionResult About()
{
return View();
}
} |
Wow! That was fast! |
Hi @RSuter
I started a new project to try to reproduce the parameter problem (#842) and got another one:
SwaggerUI generates the
/api/sites
endpoint correctly, but NSwagStudio creates it like:/api/{subscriptionId}/Sites/api/sites
The text was updated successfully, but these errors were encountered: