网页API - 扬鞭文档错误500 [英] Web Api - Swagger documentation error 500
本文介绍了网页API - 扬鞭文档错误500的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我访问招摇网址:的http://本地主机:28483 /招摇/ UI /指数
,它生成此错误:
500:未定义的http://本地主机:28483 /招摇/文档/ V1
任何想法?
更新:
看到这个细节错误在Firebug:
按扬鞭2.0不支持:多操作
与路径API / BimModel'和方法GET。请参阅配置设置 - \\ResolveConflictingActions \\为
潜在的解决方法
解决方案
在控制器,它有两个不同的GET操作,它是由扬鞭不允许的。
我建议要么为每个控制器或修改WebApiConfig
When I access to the swagger url: http://localhost:28483/swagger/ui/index
, it generates this error:
500 : undefined http://localhost:28483/swagger/docs/v1
Any ideas?
UPDATED: See this detail error in firebug:
Not supported by Swagger 2.0: Multiple operations
with path 'api/BimModel' and method 'GET'. See the config setting - \"ResolveConflictingActions\" for
a potential workaround
解决方案
In the controller, it got two different GET operations and it is disallowed by Swagger. I suggest to either have only single GET operation for each controller or modify the router in WebApiConfig
这篇关于网页API - 扬鞭文档错误500的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文