Rico Suter

Results 650 comments of Rico Suter

Its the TemplateDirectory setting where you can specify a directory with replacements

Canyou post a sample spec?

Is this a problem with c# controller code generation?

I currently dont use the controller generators in any projects thats why some features are still missing and there might be some bugs - also asp.net core is not yet...

So the output is ``` //---------------------- // // Generated using the NSwag toolchain v12.0.11.0 (NJsonSchema v9.13.13.0 (Newtonsoft.Json v11.0.0.0)) (http://NSwag.org) // //---------------------- namespace MyNamespace { #pragma warning disable [System.CodeDom.Compiler.GeneratedCode("NSwag", "12.0.11.0 (NJsonSchema...

The pr above is merged and released, doesnt that fix your problem

GenerateExceptionClasses:true is mainly used to turn this completely off ... it doesnt enforce it... so probably the check whether the exceptions are needed is flawed ATM.

Hmm, maybe there is no such check: https://github.com/RicoSuter/NSwag/blob/d69085067b2261c75f3b49a0e43a4c26aa49d743/src/NSwag.CodeGeneration.CSharp/Templates/File.liquid#L154 https://github.com/RicoSuter/NSwag/blob/d69085067b2261c75f3b49a0e43a4c26aa49d743/src/NSwag.CodeGeneration.CSharp/Models/CSharpFileTemplateModel.cs#L117 https://github.com/RicoSuter/NSwag/blob/4f345e1adc9c49d8498d4018250760aa69dd8dd2/src/NSwag.CodeGeneration.CSharp/CSharpClientGeneratorSettings.cs#L47 Maybe you turned off contracts gen? https://github.com/RicoSuter/NSwag/blob/d69085067b2261c75f3b49a0e43a4c26aa49d743/src/NSwag.CodeGeneration.CSharp/Templates/File.liquid#L31

> Or are you suggesting that the default naming convention in NJsonSchema be changed to use correct C# naming conventions and get rid of the options and overrides to change...

Is this with asp.net core?