Having Swashbuckle integrated in my .Net Web-Api project (.Net Framework 4) I'm searching for a way to document the roles that are allowed to execute a respective method.
Each of my web-api methods have a custom attribute that checks the ActiveDirectory-Group of the requesting user and if the user is allowed to execute the action. But now I would like to document that using Swashbuckle-Swagger like
///
///<AllowedRole>Administrator</AllowedRole>
///
public IHttpActionResult Index(){
...
}
Or
[SwaggerAllowedRole("Administrator")]
public IHttpActionResult Index(){
...
}
I would love to hear that there is any standard that I can use. Can anyone give me a clever trick?