Route prefixing does not appear to work for dotnet core
See original GitHub issueWe are attempting to use SwaggerToCSharpControllerGenerator to generate a dotnet core compatible web api. Unfortunately we have a slight problem with route prefixing. The generator is generating the code [routeprefix('v1')]
whereas, I believe that using dotnet core this needs to be [route('v1)]
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
ASP.NET Core route mapping: prefix is ignored
So it looks like the /ipc prefix in the path is completely ignored. Why is this happening? PS: I know I can also...
Read more >endpoints.MapControllerRoute Pattern can't using fixed ...
According to your route, it seems you want to match the home controller's routes. But inside your pattern, it doesn't contain any controller ......
Read more >Routing in ASP.NET Core
Discover how ASP.NET Core routing is responsible for matching HTTP requests and dispatching to executable endpoints.
Read more >Troubleshoot .NET tool usage issues
Discover the common issues when running .NET tools and possible solutions.
Read more >Attribute Routing in ASP.NET Web API 2
This topic discusses how to enable attribute routing in ASP.NET Web API 2 and describes various options for attribute routing.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
True,
ActionResult<TValue>
was added in 2.1. That may further complicate a compound template. In general, I’d prefer the complexity of a single template (up to a point) over having to maintain multiple templates in parallel. Though maybe there’s a way to split out the differences into different partials that get included in the same skeleton, reducing duplication while still splitting out the details?@RSuter Please note that action method could also return
IActionResult
since version 1.0 and it’s also not supported.