NSwag
NSwag copied to clipboard
Cannot pass options to NSwag code generation when added through Visual Studio Connected Services
When I add an OpenAPI service reference in a .NET Core project in Visual Studio via "Connected Services", NSwag is used to generate the C# client. In the Connected Services dialog, there is a field "Additional code generation options". According to this page, it should be possible to set command line options here, to customize the NSwag code generation.
I need to use DateOnly as DateType, and I tried lots of things: /DateType:System.DateOnly /DateType:"System.DateOnly" /DateType:"DateOnly" /dateType:System.DateOnly /dateType System.DateOnly /dateType=System.DateOnly
But none of these worked. I also did not find any information in the Wiki. I also tried other options, but none of them seemed to have any effect.
Can anyone tell me how to customize the code generation using VS Connected Services? This should be documented in the Wiki in a prominent way.