当前位置: 移动技术网 > IT编程>开发语言>.net > Ambiguous HTTP method Actions require an explicit HttpMethod binding for Swagger 2.0

Ambiguous HTTP method Actions require an explicit HttpMethod binding for Swagger 2.0

2019年04月26日  | 移动技术网IT编程  | 我要评论

广东公务员考试成绩,顺丰快递网,六盘水二手房

异常内容

notsupportedexception: ambiguous http method for action . 
actions require an explicit httpmethod binding for swagger 2.0

解决方案

思考:疯狂google,找到 , 但是底下没有有价值的回答。自己琢磨一下,比起一个标准的接口,少了http请求定义和参数定义。
猜测是因为定义不标准,对swagger来说,不标准就报错,这没问题。
验证:写一个标准的method。

[httppost,route(test)]
pulic void test([frombody] inputdto dto)
{
}

异常解决。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网