I am using NSwag to generate swagger api docs in an ASP.Net Core 2.1 project, which has mixed Web-API controller, MVC controller and Razor Pages. NSwag complains a lot about like the following, while they are valid in ASP.NET. Question: how to filer in Swagger/NSwag to include only a specific Namespace(MyProject.Api) or path (/api/)?
The method 'Post' on path '/api/XXX/Create' is registered multiple times
public ActionResult Create()
{
var doctor = new Doctor();
doctor.create_dt = DateTime.Now;
return View(doctor);
}
//
[HttpPost]
public ActionResult Create(Doctor doctor)
{
if (ModelState.IsValid)
{
theDB.Doctor.Add(doctor);
theDB.SaveChanges();
return RedirectToAction("Index");
}
return View(doctor);
}