【发布时间】:2019-09-26 04:45:19
【问题描述】:
我将Swashbuckle.AspNetCore NuGet 添加到我的项目中,它似乎运行良好。 (我得到了 Swagger 页面就好了。)
但是当我处理另一个问题时(不使用 Swagger 页面),我注意到我的调用堆栈包含 Swashbuckle。
我认为 Swashbuckle(和 Swagger)是一个文档/测试页面。因此,我担心在每次调用的路径中都会看到它(再次在我不使用招摇页面时)。
为什么 Swashbuckle 在我的调用路径中?(它需要什么才能做到这一点?)
这是我的调用堆栈,因为它很有用:
Breeze.AspNetCore.QueryFns.ExtractQueryable(ActionExecutedContext context) in C:\GitHub\breeze.server.net\AspNetCore\Breeze.AspNetCore.NetCore\QueryFns.cs
Breeze.AspNetCore.BreezeQueryFilterAttribute.OnActionExecuted(ActionExecutedContext context) in C:\GitHub\breeze.server.net\AspNetCore\Breeze.AspNetCore.NetCore\QueryFilter.cs
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext)
Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware.Invoke(HttpContext context)
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
【问题讨论】:
标签: swashbuckle