Nswag: Duplicate 'System.CodeDom.Compiler.GeneratedCode' attribute caused by multiple partial classes

Created on 3 May 2017  路  3Comments  路  Source: RicoSuter/NSwag

Using the C# client generator generates multiple partial classes and results in the following error:

Duplicate 'System.CodeDom.Compiler.GeneratedCode' attribute

The OperationGenerationMode property no longer appears to be in the SwaggerToCSharpGeneratorSettings so I can't figure out how to generate a single client to avoid this error message.

question

Most helpful comment

Why have something that by default generated code that won't compile?

All 3 comments

The setting OperationGenerationMode is only available in the command line, in C# you can use the OperationNameGenerator setting and one of the available IOperationNameGenerator implementations

Worked perfectly. Thanks

Why have something that by default generated code that won't compile?

Was this page helpful?
0 / 5 - 0 ratings