I have an API project using .NET Core 2.2 that includes a call with two parameters:
[HttpGet(nameof(VerifyCreds))]
[Route("VerifyCreds/{fName}/{lName}")]
public ActionResult<List<VerifyCredsModel>> VerifyCreds(string fName, string lName)
{
var result = _service.VerifyCreds(fName, lName);
return result;
}
This call works fine when called directly from the API. The parameters pass and the correct data gets passed with the parameter filters.
When generating a client in a .NET Core 3.0 project using nswag, the client code appears to see the parameters, but when the url gets created (i.e, the "urlBuilder" string), it just calls the base API method without any parameters, so it then returns all records. I've stepped through it from client to api and the parameters are not making it across the wire. I originally had them as optional parameters, but I removed all of that after reading that optional parameters are not supported (is that still true?).
Do I have to do something different when using 2 parameters? Or did I just do something wrong?