openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[REQ][PowerShell] Support UseDefaultCredentials

Open IzaacJ opened this issue 1 year ago • 2 comments

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

Seems there is no support for the -UseDefaultCredentials switch for Invoke-WebRequest in the PowerShell generator, at least from what I can gather from the mustache template.

Describe the solution you'd like

Built-in support for -UseDefaultCredentials

Describe alternatives you've considered

Currently having it hardcoded into the template, and am currently unable to implement it properly myself.

Additional context

We're using this to semi-automate the generation of PS modules for internal APIs in a government environment, so as few customisations we have to do manually the better.

IzaacJ avatar Apr 22 '24 11:04 IzaacJ

potentially we can add an option to add -UseDefaultCredientials in every Invoke-WebRequest call.

would that meet your requirement?

wing328 avatar Apr 24 '24 07:04 wing328

Yes, that would be sufficient for us :)

IzaacJ avatar Apr 29 '24 06:04 IzaacJ

would you like to sponsor the enhancement or contribute a PR to add the option?

wing328 avatar Aug 07 '24 10:08 wing328