Actions require an explicit HttpMethod binding for Swagger - طراحی سایت|نرم افزار اندروید|IOS|مرورگران

Actions require an explicit HttpMethod binding for Swagger

swagger

As the error is clear and tells us that some of HTTP methods should be explicitly bound to action like “Get, Post, Delete or Put” so these steps should be check :

  • Make sure all of the controller’s methods are surrounded by [HttpGet] and etcetera
  •  If your controller class inherited from a custom base class, check if all public methods of base class also surrounded by HTTP attributes like [HTTPGET], [HTTPPOST] or are protected (It was mine problem that my base class methods doesn’t has HTTP attribute)

    نظر خود را بگذارید

    آدرس ایمیل شما منتشر نخواهد شد.*