Open 19bartek92 opened 5 years ago
It seems that there is an inheritance with the same type, e.g. Apple inherits from Apple (cycle). Can you provide a sample spec?
It seems that there is an inheritance with the same type, e.g. Apple inherits from Apple (cycle). Can you provide a sample spec?
Hi, I encountered the same error System.ArgumentException: The baseTypeName 'EventAbstract' cannot equal typeName. (Parameter 'typeName')
Attached example spec. In swagger editor (https://editor.swagger.io/) spec opened successfully swagger.zip
Same here. Looks like he struggles with this constellation. (generate with nswag)
example app Example.zip
@RicoSuter do you have an estimation when you have a chance to look into this?
I get this error every try to generete outputs. It apears when "generate DTO types" is checked. What can be wrong?![obraz](https://user-images.githubusercontent.com/5702015/52096935-07248980-25c9-11e9-911d-1b27df07d9a4.png)
System.ArgumentException: The baseTypeName cannot equal typeName. Parameter name: typeName
Runtime: NetCore22 at NJsonSchema.CodeGeneration.CodeArtifact..ctor(String typeName, String baseTypeName, CodeArtifactType type, CodeArtifactLanguage language, ITemplate template) at NJsonSchema.CodeGeneration.CSharp.CSharpGenerator.GenerateClass(JsonSchema4 schema, String typeName) at NJsonSchema.CodeGeneration.GeneratorBase.GenerateTypes() at NJsonSchema.CodeGeneration.CSharp.CSharpGenerator.GenerateTypes() at NSwag.CodeGeneration.CSharp.Models.CSharpFileTemplateModel.GenerateDtoTypes() in C:\projects\nswag\src\NSwag.CodeGeneration.CSharp\Models\CSharpFileTemplateModel.cs:line 151 at NSwag.CodeGeneration.CSharp.SwaggerToCSharpGeneratorBase.GenerateFile(String clientCode, IEnumerableb__86_0() in C:\projects\nswag\src\NSwag.Commands\Commands\CodeGeneration\SwaggerToCSharpClientCommand.cs:line 239
at NSwag.Commands.CodeGeneration.SwaggerToCSharpClientCommand.RunAsync() in C:\projects\nswag\src\NSwag.Commands\Commands\CodeGeneration\SwaggerToCSharpClientCommand.cs:line 225
at NSwag.Commands.CodeGeneration.SwaggerToCSharpClientCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in C:\projects\nswag\src\NSwag.Commands\Commands\CodeGeneration\SwaggerToCSharpClientCommand.cs:line 217
at NSwag.Commands.NSwagDocument.ExecuteAsync() in C:\projects\nswag\src\NSwag.Commands\NSwagDocument.cs:line 85
at NSwag.Commands.Document.ExecuteDocumentCommand.ExecuteDocumentAsync(IConsoleHost host, String filePath) in C:\projects\nswag\src\NSwag.Commands\Commands\Document\ExecuteDocumentCommand.cs:line 77
at NSwag.Commands.Document.ExecuteDocumentCommand.RunAsync(CommandLineProcessor processor, IConsoleHost host) in C:\projects\nswag\src\NSwag.Commands\Commands\Document\ExecuteDocumentCommand.cs:line 31
at NConsole.CommandLineProcessor.ProcessSingleAsync(String[] args, Object input)
at NConsole.CommandLineProcessor.ProcessAsync(String[] args, Object input)
at NConsole.CommandLineProcessor.Process(String[] args, Object input)
at NSwag.Commands.NSwagCommandProcessor.Process(String[] args) in C:\projects\nswag\src\NSwag.Commands\NSwagCommandProcessor.cs:line 54
1 clientClasses, ClientGeneratorOutputType outputType) in C:\projects\nswag\src\NSwag.CodeGeneration.CSharp\SwaggerToCSharpGeneratorBase.cs:line 41 at NSwag.CodeGeneration.ClientGeneratorBase
3.GenerateFile(SwaggerDocument document, ClientGeneratorOutputType type) in C:\projects\nswag\src\NSwag.CodeGeneration\ClientGeneratorBase.cs:line 103 at NSwag.Commands.CodeGeneration.SwaggerToCSharpClientCommand.