我正在使用 Swashbuckle 为 API 生成文档。我的控制器方法如下所示:
[ResponseType(typeof(CategoryCollectionModel))]
public HttpResponseMessage Get(HttpRequestMessage request, [FromUri]Paging paging)
{
var input = new CategoriesListQuery.Input { Page = paging.Page, Size = paging.Size };
var result = this.queryInvoker.Execute<CategoriesListQuery.Input, CategoriesListQuery.Result>(input);
var items = Mapper.Map<CategoryCollectionModel>(result);
return request.CreateResponse(HttpStatusCode.OK, items);
}
Swashbuckle 将HttpRequestMessage
其视为生成文档中的参数。有没有办法将 Swashbuckle 配置为忽略HttpRequestMessage
,因为它仅包含在签名中用于测试目的?