NSwagStudio generating wrong endpoint address
See original GitHub issueHi @RSuter
I started a new project to try to reproduce the parameter problem (#842) and got another one:
namespace nswagtest.Controllers {
[Produces("application/json")]
[Route("/api/{subscriptionId}/[controller]")]
public class SitesController : Controller {
[HttpGet]
[ProducesResponseType(typeof(Array), StatusCodes.Status200OK)]
public IActionResult List(string searchString) {
return Ok(new[] {"with", "parameter"});
}
[HttpGet("/api/sites")]
[ProducesResponseType(typeof(Array), StatusCodes.Status200OK)]
public IActionResult ListAll(string searchString) {
return Ok(new[] {"list", "all"});
}
}
}
SwaggerUI generates the /api/sites
endpoint correctly, but NSwagStudio creates it like: /api/{subscriptionId}/Sites/api/sites
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Specifying API Endpoint at runtime when using NSwagStudio
EDIT: In NSwagStudio I've tried to create a "configuration class" but couldn't easily see how to use it or apply it to this...
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 >How to make Web API endpoint's base URL, configurable in ...
The problem I'm going to address in this article though, is: “How to get NSwag clients to read their Web API endpoint from...
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 >Automatically generating C# API clients on build with NSwag
The easiest way to create a nswag.json config file is by using NSwagStudio which you can install on Windows using an MSI you...
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
Test with https://ci.appveyor.com/project/rsuter/nswag-25x6o/build/artifacts
Wow! That was fast! Thank you so much!!! It worked 😃