NotSupportedException: Ambiguous HTTP method for action . Actions require an explicit HttpMethod binding for Swagger 2.0
思考:疯狂Google,找到 https://stackoverflow.com/questions/47822177/swagger-net-core-api-ambiguous-http-action-debugging, 可是底下没有有价值的回答。本身琢磨一下,比起一个标准的接口,少了Http请求定义和参数定义。
猜想是由于定义不标准,对Swagger来讲,不标准就报错,这没问题。
验证:写一个标准的method。api
[HttpPost,Route(test)] pulic void Test([FromBody] InputDto dto) { }
异常解决。ui