Multiple operations with path 'api/Plan/AllocateTransport' and method 'GET'
来源:互联网 发布:淘宝卖家在哪里看等级 编辑:程序博客网 时间:2024/06/05 20:33
500 : {"Message":"出现错误。","ExceptionMessage":"Not supported by Swagger 2.0: Multiple operations with path 'api/Plan/AllocateTransport' and method 'GET'. See the config setting - \"ResolveConflictingActions\" for a potential workaround","ExceptionType":"System.NotSupportedException","StackTrace":" 在 Swashbuckle.Swagger.SwaggerGeneratorOptions.DefaultConflictingActionsResolver(IEnumerable`1 apiDescriptions)\r\n 在 Swashbuckle.Swagger.SwaggerGenerator.CreatePathItem(IEnumerable`1 apiDescriptions, SchemaRegistry schemaRegistry)\r\n 在 Swashbuckle.Swagger.SwaggerGenerator.<>c__DisplayClass7.<GetSwagger>b__4(IGrouping`2 group)\r\n 在 System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)\r\n 在 Swashbuckle.Swagger.SwaggerGenerator.GetSwagger(String rootUrl, String apiVersion)\r\n 在 Swashbuckle.Application.SwaggerDocsHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n 在 System.Net.Http.HttpMessageInvoker.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n 在 System.Web.Http.Dispatcher.HttpRoutingDispatcher.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n 在 System.Net.Http.DelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)\r\n 在 System.Web.Http.HttpServer.<SendAsync>d__0.MoveNext()"} http://localhost:64922/swagger/docs/v1
-------------------------------------------------------------------------------------------
相信大家在使用Swagger 可能会出现以上错误。这个错误的引起是因为存在了多个GET方法不知道是Swagger本身的原因还是怎么回事。
如果出现以上的问题可以在“SwaggerConfig” 配置里启用这一行
c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
但只能用一个GET方法
- Multiple operations with path 'api/Plan/AllocateTransport' and method 'GET'
- Handling multiple pending socket read and write operations
- Selenium-WebDriver API Commands and Operations
- Binary Tree Operations(II) - Path Sum and Cycle Detection
- VC Multiple Threads Programming with API
- Deal with Multiple Stocks - Google Finance API
- Office 365 Service Communications API operations--Get Services
- Office 365 Service Communications API operations--Get Current Status
- Office 365 Service Communications API operations--Get Historical Status
- Office 365 Service Communications API operations--Get Messages
- WPF. SIMPLE ADORNER USAGE WITH DRAG AND RESIZE OPERATIONS
- Getting Started with NHibernate and ASP.NET MVC- CRUD Operations
- Fast Pixel Operations in .NET (With and Without unsafe)
- xpath get element ------------method and exception---------frame
- API LZCopy And with td1
- Passing Multiple Parameters to ASP.NET Web API With jQuery
- get explain plan
- get explain plan
- 索引概述
- python字典多键值及重复键值的使用方法(详解)
- SQL like与regexp区别
- 仿知乎app登录界面(Material Design设计框架拿来就用的TexnInputLayout)
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
- Multiple operations with path 'api/Plan/AllocateTransport' and method 'GET'
- 文章标题
- 随处可见的用户体验
- 【数据结构 队列 + 二叉树】
- Quartz作业调度(2)
- Android activity 概要
- Shell脚本接收有空格参数问题
- c# 线程中如何控制控件焦点
- Google glog