在URI复杂类型的WebAPI帮助页面 [英] WebAPI help page for complex type in URI
问题描述
我用<一个href=\"http://blogs.msdn.com/b/yaohuang1/archive/2012/08/15/introducing-the-asp-net-web-api-help-page-$p$pview.aspx\"相对=nofollow>的WebAPI的帮助页面提供的文档。
文档除非我在URI使用复杂的模型产生的罚款(从XML注释)。
所以,我得到以下文档
I'm using WebAPI help page to provide a documentation. Documentation is generated fine (from xml comments) except when I use complex model in the uri. So, I get the following doc
GET service/Tst2 No documentation available.
该方法:
/// <summary>
/// description
/// </summary>
[HttpGet]
public string Tst([FromUri] TstModel filter)
{
return null;
}
public class TstModel
{
public int Id { get; set; }
}
对于简单的INT /字符串参数它按预期工作的其他方法。如果我删除的 [FromUri] 的属性也适用,但随后
所以,问题是:我怎么能显示这些方法的文档?我怎样才能从URI?
So the question is: how can I show documentation for such methods? How can I provide documentation for complex types taken from the URI?
推荐答案
关于关于帮助你原来的问题没有被用于复杂类型饰[FromUri]属性,它是一个已知的问题上,我们将努力产生的。
Regarding your original question about help not being generated for Complex Type decorated with [FromUri] attribute, its a known issue on which we would be working on.
这篇关于在URI复杂类型的WebAPI帮助页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!