Swagger Swashbuckle-如何在Schema部分中包含参数类型

Swagger Swashbuckle-如何在Schema部分中包含参数类型,swagger,swagger-ui,swagger-2.0,swashbuckle,Swagger,Swagger Ui,Swagger 2.0,Swashbuckle,我有一个使用Swashback的Azure函数应用程序 [函数名(“DoWorkV2”)] [QueryStringParameter(“DoWorkParameters”,数据类型=typeof(DoWorkParametersV2),必需=true] [产品响应类型(typeof(DoWorkResults),(int)HttpStatusCode.OK)] 公共静态异步任务DoWorkV2( [HttpTrigger(AuthorizationLevel.Function,“get”,“p

我有一个使用Swashback的Azure函数应用程序

[函数名(“DoWorkV2”)]
[QueryStringParameter(“DoWorkParameters”,数据类型=typeof(DoWorkParametersV2),必需=true]
[产品响应类型(typeof(DoWorkResults),(int)HttpStatusCode.OK)]
公共静态异步任务DoWorkV2(
[HttpTrigger(AuthorizationLevel.Function,“get”,“post”,Route=null)]HttpRequest请求,
ILogger日志,ExecutionContext(上下文)
{
由ProducesResponseType属性定义的返回类型包含在schema部分中。 架构部分中不包括QueryStringParameter属性定义的参数


如何使参数显示在架构部分,以便我的消费者知道要传递哪种类型的参数?

我最终使用ProducesResponseType为QueryStringParameter中包含的类型创建了一个虚拟方法。现在我有两个额外的方法不做任何事情。看起来有点粗糙,但该类型现在显示在架构部分中f大摇大摆的页面

[FunctionName("DoWorkParametersV2Factory")]
[ProducesResponseType(typeof(DoWorkParametersV2), (int)HttpStatusCode.OK)]
public static async Task<IActionResult> DoWorkParametersV2Factory(
    [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
    ILogger log, ExecutionContext context)
{
[FunctionName(“DoWorkParametersV2工厂”)]
[产品响应类型(typeof(DoWorkParametersV2),(int)HttpStatusCode.OK)]
公共静态异步任务DoWorkParametersV2Factory(
[HttpTrigger(AuthorizationLevel.Function,“get”,“post”,Route=null)]HttpRequest请求,
ILogger日志,ExecutionContext(上下文)
{