question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Route prefixing does not appear to work for dotnet core

See original GitHub issue

We 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:open
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
cromocommented, Aug 28, 2018

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?

0reactions
altsocommented, Aug 29, 2018

@RSuter Please note that action method could also return IActionResult since version 1.0 and it’s also not supported.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found