RicoSuter / NSwag

The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
http://NSwag.org
MIT License
6.61k stars 1.22k forks source link

Can't apply settings when generating client via openapi2csclient #4895

Open dvaca-sml opened 1 month ago

dvaca-sml commented 1 month ago

I have the following powershell script where I use nswag openapi2csclient to generate a client. And I'm trying disable settings useBaseUrl and generateBaseUrlProperty

$namespace = "MyNamespace"
$className = "ProductServiceClient"
nswag openapi2csclient /input:swagger.json /classname:$className /namespace:$namespace /output:$className.cs /useBaseUrl:false /generateBaseUrlProperty:false

But when I look at the client that gets generated, it looks like the settings did not get applied.

Also, I did them same thing in Nswag Studio and it works correctly there. Here's a comparison between the two: image

Why are the settings not getting applied. Is there something I'm doing wrong?