If you use Swashbuckle, you can try
[SwaggerResponse(200, typeof(CustomModel))]
and you additionally add a comment for this type of response as an optional third parameter
[SwaggerResponse(200, typeof(CustomModel), "returns a new id of the bla bla")]
Note. The attribute is in the Swashbuckle.AspNetCore.Annotations namespace
L. mihai
source share