0
我陷入困境,试图从visual studio中了解Swagger & Owin模板。EnableSwagger混淆
我基本上停留在一开始:
var httpConfiguration = new HttpConfiguration();
// Configure Swagger UI
httpConfiguration
.EnableSwagger(c => c.SingleApiVersion("v1", "Test API"))
.EnableSwaggerUi();
当我感到困惑的是lambda函数的SingleApiVersion似乎空穴来风。
这是如何融合在一起的?
我可以看到EnableSwagger扩展方法有两个重载:
(Action<SwaggerDocsConfig> configure = null) //(this is also confusing) and
(string routeTemplate, Action<SwaggerDocsConfig> configure = null)
所以我可以看到SingleApiVersion已经从SwaggerDocsConfig 但怎样!
谢谢,对于基本问题感到抱歉,我想我已经给自己头痛,试图理解这一点。