I have a remedial question. In our code base, I'm seeing different API controllers and sometimes, devs are using routes that start with "/" and other times not.
From what I can tell, regardless of whether the endpoint starts with "/" or not, they all are discoverable by this same URI
https://localhost:123/nameofcontroller
Sample C# Code:
[Route("/widgets/tools/calc")]
or [Route("widgets/tools/calc")]
Does it matter?
EDIT 1
So after some additional reading it seems that we are using attribute routing... cuz we define the routes in the controller cs file, like this: (please correct me if i'm wrong)
controller1.cs
[HttpGet]
[Route("/widgets/{widgetID}/report
controller2.cs
[HttpGet]
[Route("widgets/tools/calc
But I'm still trying to understand what the diff is between routes that start with "/" and those that don't.