Skip to content

[REQ] typescript-axios useSingleRequestParameter should mark parameter optional if all properties are optional #6440

Closed
@benwiley4000

Description

@benwiley4000

Follow-up to #6288.

Is your feature request related to a problem? Please describe.

If the useSingleRequestParameter flag is passed to typescript axios, then an object is a required parameter of all request functions, even if all object properties are optional, so I end up with code like this:

myApiCall({}).

Describe the solution you'd like

The generator should be able to check if any of the params are required. If not, we can specify the whole object parameter optional with ?.

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions