Reputation: 709
I'm new to Swagger and Web API. I created a Web API project with a simple controller called PrimeCalculator.
public class PrimeCalculatorController : ControllerBase {
[HttpGet]
public IEnumerable<string> Get() {
//stuff
return new string[] { "value1", "value2" };
}
}
So my method in Swagger looks like this:
As you can see, there is one method with a get call. So far so good, but now I want to change method name. I found this:
[Http(name="newMethodName"]
However, the method's name stays the same. I don't know if I'm missing something. Any tutorial to learn or help is welcome.
Results after changing the method name (nothing changes):
Upvotes: 0
Views: 1723
Reputation: 290
[Http(name="newMethodName")]
-> [HttpGet("newMethodName")]
Upvotes: 3