Skip to content

Api method with optional parameter still generates client with mandatory parameter #49

@minuz

Description

@minuz

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions