zenvia-openapi-spec icon indicating copy to clipboard operation
zenvia-openapi-spec copied to clipboard

[c#]Found incompatible property types , for property 'message' in schema inheritance chain

Open luizfbicalho opened this issue 4 years ago • 1 comments

I got this error to generate the c#
autorest --input-file=../openapiv2.json --csharp --output-folder=API --namespace=Zenvia.API --v3

and that's the result

AutoRest code generation utility [cli version: 3.0.6247; node: v12.18.3, max-memory: 2048 gb] (C) 2018 Microsoft Corporation. https://aka.ms/autorest Loading AutoRest core 'C:\Users\luizb.autorest@[email protected]\node_modules@autorest\core\dist' (3.0.6320) Loading AutoRest extension '@microsoft.azure/autorest.csharp' (~2.3.79->2.3.91) Loading AutoRest extension '@microsoft.azure/autorest.modeler' (2.3.55->2.3.55) FATAL: System.InvalidOperationException: Found incompatible property types , for property 'message' in schema inheritance chain at AutoRest.Modeler.SchemaResolver.ExpandAllOf(Schema schema) in /opt/vsts/work/1/s/src/SchemaResolver.cs:line 157 at AutoRest.Modeler.SchemaResolver.Unwrap(Schema schema) in /opt/vsts/work/1/s/src/SchemaResolver.cs:line 75 at AutoRest.Modeler.SchemaBuilder.BuildServiceType(String serviceTypeName, Boolean required) in /opt/vsts/work/1/s/src/SchemaBuilder.cs:line 35 at AutoRest.Modeler.SwaggerModeler.BuildCompositeTypes() in /opt/vsts/work/1/s/src/SwaggerModeler.cs:line 348 at AutoRest.Modeler.SwaggerModeler.Build(ServiceDefinition serviceDefinition) in /opt/vsts/work/1/s/src/SwaggerModeler.cs:line 66 at AutoRest.Modeler.Program.<ProcessInternal>d__2.MoveNext() in /opt/vsts/work/1/s/src/Program.cs:line 60 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at NewPlugin.<Process>d__15.MoveNext() Error: Plugin imodeler1 reported failure.

with the swagger editor I got compilation error

luizfbicalho avatar Nov 24 '20 13:11 luizfbicalho