NSwagStudio generating wrong method signature
See original GitHub issueHi guys,
I have these routes in my asp.net core:
/api/{subscriptionId}/sites
public IActionResult List(string searchString);
/api/sites
public IActionResult ListAll(string subscriptionIdFilter = null, string searchString = null);
NSwagStudio is generates the first method just fine, but it is adding a phantom parameter called subscriptionId to the second one:
public async Task<ListViewModelOfSiteItem> ListAllAsync(string subscriptionId, string subscriptionIdFilter = null, string searchString = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
This method is calling the first’s method endpoint, nswagstudio is somehow mixing them two. Or maybe I’m doing something wrong…?
Any thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
NSwag Studio C# generated client code does not have any ...
I am trying to generate some client code from a swagger.json file and the methods created by NSwag do not have any return...
Read more >Get started with NSwag and ASP.NET Core
Learn how to use NSwag to generate documentation and help pages for an ASP.NET Core web API.
Read more >Using OpenApiReference To Generate Open API Client ...
I this post I show how you can customise the code generated by the OpenApiReference tooling from Visual Studio's Connected Services using ...
Read more >Generate TypeScript and C# clients with NSwag based on ...
Learn how to generate TypeScript and C# API clients with NSwag to reduce your workload when building a project.
Read more >Auto generated WebAPI client library with NSwag
How to configure dotnet core solutions to automatically generate client packages for WebAPI projects.
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
Yes this is the problem… For now remove the route on the controller and specify all routes manually on the action - or dont use absolute routes on the actions when a ctrl route is set
Yeap, sounds good.