It's been a while since I made an API. Now I was looking at it again and I tried to simply add a get method to the WeatherForecastController. But I keep getting a swagger error after adding it. The method looks very similar to the existing method. only that this one uses a parameter. But after adding it I keep getting an error in my browser. and I'm not sure why. I haven't done this in a very long time. And I never used swagger before.
Note that I simply created the project and added the method that is all I did. This is the browser error.






Name. Remove the placeholder and use the constructor with the string only or use theTemplateplaceholder. Take care about the parameteramount, though. If you don't insert it inside the template, you'll only be able to pass it through QueryString.