SwaggerRequestHeader - Jusas/NSwag.AzureFunctionsV2 GitHub Wiki

SwaggerRequestHeaderAttribute

Indicates that a header with the given name must or can be present in the request headers.

Example usage:

[SwaggerRequestHeader("x-header", false, typeof(string), "description")]
[SwaggerResponse(200, typeof(string), Description = "OK result")]
[FunctionName("SwaggerRequestHeaderAttribute1")]
public static async Task<IActionResult> SwaggerRequestHeaderAttribute1(
    [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,
    ILogger log)
{
    return new OkResult();
}