Api method with optional parameter still generates client with mandatory parameter
minuz opened this issue · comments
Writting an api controller action like the following:
[HttpGet("control")]
[ProducesResponseType(typeof(Response<DataTransfer.ControlRegister.Control[]>), 200)]
public async Task<IActionResult> ControlGetAll(bool includeParameters = false)
{
var rules = await this.policyService.GetAllControlsAsync(includeParameters);
return this.Maybe<DataTransfer.ControlRegister.Control[]>(rules.Select(DataTransfer.ControlRegister.Control.From).ToArray());
}
Should have the parameter includeParameters as optional, but the generated code still requires that parameter to get the correct response.