使用ASP.NET Web API帮助页面验证文档模型

时间:2013-06-14 19:27:55

标签: documentation asp.net-web-api

我使用Nuget的ASP.NET Web Api帮助页面包来提供我正在开发的API的基本文档。但是,我的行动宣言中的一个共同主题是存在一个单一的模型"参数,像这样:

public class UsersController
{
    public bool Post(UserUpdateModel model) 
    {
        // ...
    }
}

在生成的web api帮助页面中,单个参数" model"已列出。我希望能够记录模型的属性和验证要求。这可能吗?

1 个答案:

答案 0 :(得分:0)

此功能目前不支持开箱即用。这里有跟踪它的问题。你可以对它进行投票:

http://aspnetwebstack.codeplex.com/workitem/877