Swashbuckle.AspNetCore SwaggerOperation attribute not found
Another option is to set Name
property for your HttpGet
filter like this:
[HttpGet(Name = "GetAllAdresses")]
[Produces("application/json")]
[ProducesResponseType((int)HttpStatusCode.NotFound)]
[ProducesResponseType(typeof(List<AddressDto>), (int)HttpStatusCode.OK)]
[SwaggerOperation("GetAllAdresses")]
public async Task<IActionResult> GetAllAsync()
{
....
}
I ran across this today. I needed to add the following nuget package that was just added for V3.0.0:
Swashbuckle.AspNetCore.Annotations
Breaking changes are described here
Please also note that you need to add the following to Startup.cs or your Swagger extension:
AddSwaggerGen(c => { ... c.EnableAnnotations(); })