Skip to content
This repository was archived by the owner on Jun 3, 2023. It is now read-only.

SwaggerRequestHeader

Jussi Saarivirta edited this page Feb 16, 2019 · 2 revisions

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();
}