I've decoreated an action method of a controller with the SwaggerResponse attribute like that:
[SwaggerResponse(HttpStatusCode.OK, Type = typeof(SomeType))]
But in UI I'm still getting:

Neither the xml comments do the job:
/// <response code="400">Bad request</response>
/// <response code="500">Internal Server Error</response>
In the latest version (6.0.0-beta902), SwaggerResponseAttribute has been replaced in favor of AspNet Core's built-in ProducesResponseTypeAttribute. Using a combination of this and the XML comments you should be able to get the results you need:
/// <summary>
/// Creates an order
/// </summary>
/// <param name="order"></param>
/// <response code="201">Order created</response>
/// <response code="400">Order invalid</response>
[HttpPost]
[ProducesResponseType(typeof(int), 201)]
[ProducesResponseType(typeof(IDictionary<string, string>), 400)]
public IActionResult Create([FromBody, Required]Order order)
{
return new CreatedResult("/orders/1", 1);
}
Most helpful comment
In the latest version (6.0.0-beta902), SwaggerResponseAttribute has been replaced in favor of AspNet Core's built-in ProducesResponseTypeAttribute. Using a combination of this and the XML comments you should be able to get the results you need: