Context
I've added a connected service to my .NET 6 project and using NSwagCSharp code generator to generate the client. (In my previous project I used NSwagStudio)
I discovered that in the .csproj file there is a possibility to add options:
<OpenApiReference Include="OpenAPIs\swagger.json" CodeGenerator="NSwagCSharp" ClassName="MyClient">
<SourceUri>https://localhost:xxxx/swagger/v1/swagger.json</SourceUri>
<Options>/UseBaseUrl:false /GenerateClientInterfaces:true /InjectHttpClient:false, /DisposeHttpClient:false,
</Options>
</OpenApiReference>
It seems those options are very same what NSwagStudio saves to its .nswag file. I am not sure this is only a guess, some of the them seems working so far. (is this documented somewhere?)
However NSwagStudio saves the default values too, (what I do no know what are) so in a typical .nswag file there are approx 80 settings in json:
"codeGenerators": {
"openApiToCSharpClient": {
...
"generateClientInterfaces": true,
"clientBaseInterface": null,
... up to more than 80 lines...
Question
This would result a very long line in <Options>
element in the .csproj file. (It seems line breaks not allowed(?) within). Is there any way to use an external options file like the json .nswag file to configure code generation options?