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

SwaggerRequestBodyType

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

SwaggerRequestBodyTypeAttribute

Indicates the type of the request body.

Example usage:

[SwaggerRequestBodyType(typeof(Person), Description = "description", Required = true, Name = "Body")]
[SwaggerResponse(200, typeof(string), Description = "OK result")]
[FunctionName("SwaggerRequestBodyTypeAttribute1")]
public static async Task<IActionResult> SwaggerRequestBodyTypeAttribute1(
    [HttpTrigger(AuthorizationLevel.Anonymous, "post", Route = null)] HttpRequest req,
    ILogger log)
{
    return new OkResult();
}