我的Web API请求模型属性: public List<Feature> Features { get; set; }
功能是一个抽象类。我得从它衍生出来的许多类: public abstract class Feature
{
public string Title { get; set; }
}
public class ImageFeature : Feature
将请求从www.mysite.com重定向到www.mysite.com/swagger的正确方法是什么? 我设置了一个索引控制器装饰有路由(“”),它的工作原理,但似乎是一个Kludge。我认为应该有一种方法来在Startup.cs中的MVC路由中指定它,我无法弄清楚它。 // kludge code, how do I do this in app.UseMvc(route => route.
我已通过添加下面一行用扬鞭改变了我的API响应参数蛇情况WebApiConfig.cs public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
config.Formatters.JsonFormatter.SerializerSettin