Skip to content

Instantly share code, notes, and snippets.

@andrecarlucci
Created July 12, 2017 20:46
Show Gist options
  • Save andrecarlucci/9515c301abc39caf68f3b76f77e0165c to your computer and use it in GitHub Desktop.
Save andrecarlucci/9515c301abc39caf68f3b76f77e0165c to your computer and use it in GitHub Desktop.
NSwag error generating endpoint address
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"});
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment