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

SwaggerQueryParameter

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

SwaggerQueryParameterAttribute

Indicates that a query parameter with the given name must or can be present in the request query parameters.

Example usage:

[SwaggerQueryParameter("queryParam", false, typeof(string), "A query parameter")]
[SwaggerResponse(200, typeof(string), Description = "OK result")]
[FunctionName("SwaggerQueryParamAttribute1")]
public static async Task<IActionResult> SwaggerQueryParamAttribute1(
    [HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = null)] HttpRequest req,
    ILogger log)
{
    return new OkResult();
}