The first parameter is a controller type and the second+ are the excluded method names. Helpful if you want to include swagger endpoint in the controller itself. This way it won't get documented.
The second parameter in this case is a settings object which I will describe in second part.
These methods and their overloads return json string. Core.net will not return string correctly if your make it the output of the method. It will escape it. I suggest you do the following.
[AllowAnonymous]
[HttpGet("/swagger/Application")]
public ActionResult GetSwagger()
{
var result = WebApiToSwagger.GenerateForController(typeof(ApplicationController),null);
return new FileContentResult(Encoding.UTF8.GetBytes(generateForControllers), "application/json");
}