public ApiDeclaration GetApi(string controllerName) { var r = SwaggerGen.CreateApiDeclaration(ControllerContext); var actions = _apiDescriptions.Where( a => a.ActionDescriptor.ControllerDescriptor.ControllerName .Equals(controllerName,StringComparison.InvariantCultureIgnoreCase) ); var swaggerGen = new SwaggerGen(); r.Apis = actions.Select(swaggerGen.CreateApi); r.Models = ModelGen.CreateModels(actions, _docProvider); return r; }
public ApiDeclaration GetApi(string controllerName) { var r = SwaggerGen.CreateApiDeclaration(ControllerContext); var actions = _apiDescriptions.Where( a => a.ActionDescriptor.ControllerDescriptor.ControllerName .Equals(controllerName, StringComparison.InvariantCultureIgnoreCase) ); var swaggerGen = new SwaggerGen(); r.Apis = actions.Select(swaggerGen.CreateApi); r.Models = ModelGen.CreateModels(actions, _docProvider); return(r); }